dfdix: Delete index references to a subfile
Use this group of functions to delete index references to the current subfile or a specific subfile.
Last updated
- Changed in 2021.
- Changed for PUT11.
- Changed for PUT10.
- Changed for PUT03.
- Changed for PUT00.
Format
void dfdix_alg(dft_fil *file, dft_opt options, dft_alg *alg);void dfdix_alg_pth(dft_fil *file, dft_opt options, dft_alg *alg,
dft_alg pth);
- alg
- A pointer to an algorithm argument that identifies the subfile.
The z/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 z/TPFDF product uses the algorithm argument to locate the subfile. For more information about how the z/TPFDF product uses the algorithm argument to locate the subfile, see z/TPFDF Database Administration.
Note: The area of storage that contains the algorithm argument must not be modified and must be accessible to the z/TPFDF product until the subfile is closed and the SW00SR is released. - file
- A pointer to the base address of the SW00SR slot (defined in c_sw00sr.h) of the file that you want to access and is returned by the dfifb or dfopn function. Use the acc parameter to specify a particular subfile to access. If you do not specify the acc parameter, the last subfile accessed with this SW00SR slot will be accessed.
- options
- are the processing options for this function. Use one of the following
values:
- DFDIX_PATH_ALL
- deletes the index references for all paths.
- 0
- Specifies that you do not want to use any processing options.
- pth
- The path number for a detail subfile using index support. The
value is defined in the DBDEF macro and is a decimal number (0, 1,
2, and so on). The default path number is 0.
For more information about path indexes, see z/TPFDF Database Administration.
Entry requirements
Ensure that the relationship of the index file (or index files, if there are multilevel indexes) to the detail file has been defined with the DBDEF macro by your database administrator.
Return conditions
If the file you are deindexing is indexed on a path that is enabled for recoup optimized chain chasing, SW00REC is set to 0 and keys are deactivated before returning to the caller. You must reestablish the LREC pointer and any required keys before you continue to use the subfile.
Error return
For information about how to check the error indicators, see Identifying return indicators and errors.
Programming considerations
- The type definitions (for example,
dft_fil,dft_ref, anddft_kyl) are defined in the c_cdfapi.h header file. - If any of the following parameters contain addresses above 2 GB, performance may be affected. The alg parameter (pointer to an algorithm) can affect performance if passed above the 2 GB bar.
- The dfcls functions do an internal dfdix function when you specify a DFCLS_RELFC value in the options parameter.
- If an intermediate index becomes empty, the z/TPFDF product releases the block and deletes any references to the subfile in higher-level indexes.
- If the ALGINFOID parameter is defined in the DBDEF macro, the LRECs with the algorithm information are removed from the corresponding algorithm information file. The entire algorithm string, including the user data, must match the information specified on the index function.
- For programming considerations when you use this function with data event processing, see z/TPFDF API programming considerations for data event processing.
Examples
dft_fil *file_ptr;
char member_number[10];
⋮
dfdix_alg_pth(file_ptr, 0, member_number, 1);