bdfp1m1hProgramming Concepts and Reference

dfopt-Set Optional Information

Use this group of functions to set options after opening a file.

Format

void dfopt1(dft_fil *file, dft_opt options, dft_xxx opt1);
void dfopt2(dft_fil *file, dft_opt options, dft_xxx opt1,
     dft_xxx opt2);
void dfopt3(dft_fil *file, dft_opt options, dft_xxx opt1,
     dft_xxx opt2, dft_xxx opt3);
void dfopt4(dft_fil *file, dft_opt options, dft_xxx opt1,
     dft_xxx opt2, dft_xxx opt3, dft_xxx opt4);
void dfopt5(dft_fil *file, dft_opt options, dft_xxx opt1,
     dft_xxx opt2, dft_xxx opt3, dft_xxx opt4, dft_xxx opt5);
void dfopt6(dft_fil *file, dft_opt options, dft_xxx opt1,
     dft_xxx opt2, dft_xxx opt3, dft_xxx opt4, dft_xxx opt5,
     dft_xxx opt6);



Options Parameter Values
 
   .-|--------------------.
   V                      |
|----+-DFOPT_POOLTYP----+-+-------------------------------------|
     +-+-DFOPT_CHKA--+--+
     | '-DFOPT_NOCHK-'  |
     +-DFOPT_INTERLEAVE-+
     +-DFOPT_PARTITION--+
     +-DFOPT_PATH-------+
     +-DFOPT_ENDORD-----+
     '-DFOPT_BEGORD-----'
 
 

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. The values you specify indicate what additional parameters (such as, opt1, opt2, and so on) you are supplying with the function call.

The number of values you must specify for the options parameter is based on which dfopt function you use. For example, if you are using dfopt1, specify one of the following values; if you are using dfopt2, specify two of the following values; and so on.

DFOPT_POOLTYP
indicates that you are specifying the pool type with the pooltype parameter. Use this value to override the pool type defined in the DSECT for the subfile.

DFOPT_CHKA
indicates that you are specifying a record code check (RCC) character with the chka parameter. Use this value when you want to check the RCC value of the prime block of the subfile that it opens with dfopn and any blocks that it reads using dfred. If the RCC values do not match, the TPFDF product returns an error condition.

DFOPT_NOCHK
indicates that you are specifying a record code check (RCC) character with the chka parameter. Use this value when you do not want to check the record code check (RCC) value of blocks that are read with subsequent dfred functions.

DFOPT_INTERLEAVE
indicates that you are specifying an interleave number with the partition parameter and you want to access LRECs in this interleave.

DFOPT_PARTITION
indicates that you are specifying a partition number with the partition parameter and you want to access LRECs in this partition.

DFOPT_PATH
indicates that you are specifying a path number with the path parameter. Use this value if you are opening an indexed subfile that has more than one path. See TPFDF Database Administration for more information about index paths.

DFOPT_ENDORD
indicates that you are specifying an ordinal number for the end of the subfile with the endord parameter.

DFOPT_BEGORD
indicates that you are specifying an ordinal number for the start of the subfile with the begord parameter.

optn
are the optional parameters (such as opt1, opt2, and so on) that you are specifying. Replace the optn parameters with any of the following parameters.

pooltype
is the pool type, which can be one of the following:

0
uses the pool type defined by the PF0 parameter of the DBDEF macro.

1
uses the pool type defined by the PF1 parameter of the DBDEF macro.

2
uses the pool type defined by the PF2 parameter of the DBDEF macro.

Use this parameter if you specified the DFOPT_POOLTYP value with the options parameter.

chka
is a record code check (RCC) value in the range of 0x00-0xFF. Use this parameter if you specified the DFOPT_CHKA or DFOPT_NOCHK value with the options parameter.

partition
is one of the following:

num
is a partition or interleave number, which you can get from your database administrator.

DFOPT_ALL
specifies all partitions or all interleaves of the file.

Use this parameter if you specified the DFOPT_PARTITION or DFOPT_INTERLEAVE value with the options parameter.

path
is the path number, which is a decimal value defined with the DBDEF macro, that you want to use to access detail subfiles. See your database administrator for this path value and see TPFDF Database Administration for more information about index paths.

Use this parameter if you specified the DFOPT_PATH value with the options parameter.

begord
is the beginning ordinal number. Use this parameter if you specified the DFOPT_BEGORD value with the options parameter.

endord
is the ending ordinal number. Use this parameter if you specified the DFOPT_ENDORD value with the options parameter.

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