bdfp1m10Programming Concepts and Reference

dfadr-Provide the File Address of a Prime Block

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);



alg
is a pointer to an algorithm argument that identifies the subfile.

beg
is a pointer to an algorithm argument that is used to calculate the begin ordinal of the file. This ordinal is used as the start ordinal during fullfile processing.

end
is a pointer to an algorithm argument that the TPFDF product uses to calculate the end ordinal of the file. This ordinal is used as the end ordinal during fullfile processing.

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.

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

DFADR_NODUMP
specifies that you do not want the TPFDF product to issue any of the following system errors while processing this function:
  • DB0100
  • DB0102
  • DB0117
  • DB0123
  • DB0138
  • DB0140.

See Messages (System Error, Online, Offline) and Master Glossary for more information about these system errors.

Note:
Using the DFADR_NODUMP value is not recommended because it can prevent system errors from being issued that indicate a critical problem.

DFADR_WRAPAROUND
reads LRECs from the start of the file to the end until it has read the whole file. Use this parameter value only when you intend to use fullfile processing.

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.

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

ord
is the ordinal number of the subfile that you want to access.

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

Examples

Related Functions