bdfp1m1r | Programming Concepts and Reference |
Use this function to read a subfile from an input tape or sequential data
set to main storage.
Format
void dftrd(dft_fil *file, dft_tpn *tape);
- file
- is a pointer to the base address of the SW00SR slot (defined in
c$sw00sr.h) of the subfile that you want to access
and is returned by the dfopn function.
- tape
- is a pointer to a variable containing the 3-character symbolic tape name
or sequential data set.
Entry Requirements
None.
Normal Return
None.
Error Return
See Identifying Return Indicators and Errors for information about how to check the error
indicators.
Programming Considerations
- The type definitions (for example, dft_fil,
dft_ref, and dft_kyl) are defined in the
c$cdfapi.h header file.
- The dftrd function reads one subfile at a time. After
you call the dftrd function, you must then call the
dftld function before reading another subfile. (You can use
the DFTLD_SKIP value with dftld to ignore the subfile.)
- If you use the dftrd function in a commit scope, a rollback of
the commit scope will not restore the position of the tape. See Commit Scopes for more information about commit scopes.
Examples
The following example reads a subfile from tape to main storage. A
pointer to the 3-character tape name is in tape_name.
dft_tpn *tape_name;
dft_fil *file_ptr;
·
·
·
dftrd(file_ptr, tape_name);
Related Functions