bdfp1m1qProgramming Concepts and Reference

dftlg-Write a File or Subfile to Tape

Use this group of functions to write a file, or part of a file, to a real-time tape, a general tape, or a sequential data set.

Format

void dftlg(dft_fil *file, dft_opt options, dft_tpn *tape);
void dftlg_acc(dft_fil *file, dft_opt access, dft_opt options,
     dft_tpn tape, dft_xxx acc);
void dftlg_inc(dft_fil *file, dft_opt options, dft_tpn *tape,
     dft_idl *inc_list);
void dftlg_acc_inc(dft_fil *file, dft_opt access, dft_opt options,
     dft_tpn tape, dft_xxx acc, dft_idl *inc_list);



acc
is an ordinal number, a file address, or a pointer to an algorithm string that specifies the subfile you want to access. The type for this parameter is determined by the value you specify for the access parameter.

access
is the method you want to use to access the subfile. Use one of the following values:

DFTLG_ALG
specifies that you are providing a pointer to an algorithm argument in the acc parameter. The acc parameter is of type dft_alg.

The TPFDF product uses the algorithm argument to determine the subfile (ordinal number) that is to be accessed. Specify the algorithm argument based on the type of algorithm that is defined in the DSECT or DBDEF macro for the file. If the DSECT or DBDEF macro defines the #TPFDB04 or the #TPFDB0D algorithm, do not use this parameter.

If the subfile you are accessing is contained in a detail file or intermediate index file defined with the #TPFDBFF algorithm, the TPFDF product uses the algorithm argument to locate the subfile. See TPFDF Database Administration for more information about how the TPFDF product uses the algorithm argument to locate the subfile.

DFTLG_FADDR
specifies that you are providing a file address in the acc parameter. A file address is in integer format. The acc parameter is of type dft_fad.

DFTLG_ORD
specifies that you are providing an ordinal number in the acc parameter. Ordinal numbers in a file start at zero and are in integer format. The acc parameter is of type dft_ord.

If the file is partitioned or interleaved, specify the relative ordinal number within the partition or interleave. If the file is not partitioned or interleaved, specify the file address compute program (FACE) ordinal number.

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.

inc_list
is a pointer to a list of file IDs that you want to be included in the action of the function.

options
are the processing options for this function. Use the following values:

DFTLG_DELETE
deletes all the LRECs in the DASD file after the records are written to tape or sequential data set. Any previously used blocks are returned to pool.

DFTLG_FULLFILE
writes LRECs from the whole input file (not from a single subfile) to tape or sequential data set.

DFTLG_INITIALIZE
deletes all the LRECs in the DASD file after the records are written to tape or sequential data set. Any previously used blocks are returned to pool, except the prime block.

0
specifies that you do not want to use any processing options.

tape
is a pointer to a character array holding the 3-character tape name.

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

Examples

Related Functions