bdfp1m10 | Programming Concepts and Reference |
Use this group of functions to get the file address of a prime block in a fixed file.
You can also use a dfadr function to specify a range of ordinals to be used in subsequent fullfile processing.
Format
void dfadr_alg(dft_fil *file, df_opt options, dft_alg *alg);
void dfadr_ord(dft_fil *file, df_opt options, dft_ord ord);
void dfadr_beg(dft_fil *file, df_opt options, dft_alg *beg);
void dfadr_end(dft_fil *file, df_opt options, dft_alg *end);
void dfadr_beg_end(dft_fil *file, df_opt options, dft_alg *beg, dft_alg *end);
|
See Messages (System Error, Online, Offline) and Master Glossary for more information about these system errors.
For example, consider a file that contains five subfiles and the current subfile is number 3. If you specify DFADR_WRAPAROUND, and then call a dfred function with DFRED_FULLFILE, LRECs would be read from the subfiles in the order: 3, 4, 0, 1, 2.
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.
Entry Requirements
None.
Normal Return
The dfadr function does not change the current LREC even if you specify a different value for the alg or ord parameter with the dfadr function from that which was used to locate the LREC.
Error Return
See Identifying Return Indicators and Errors for information about how to check the error indicators.
Programming Considerations
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.
Examples
dft_fil *file_ptr;
·
·
·
dfadr(file_ptr, DFADR_ORD, 0, 3);
dft_fil *file_ptr;
·
·
·
dfadr(file_ptr, DFADR_ALG, 0, member_number);
Related Functions