bdfp1m17Programming Concepts and Reference

dfdix-Delete Index References to a Subfile

Use this group of functions to delete index references to the current subfile or a specific subfile.

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
is a pointer to an algorithm argument that identifies the subfile.

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.

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 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
is 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.

See TPFDF Database Administration for more information about path indexes.

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.

Normal Return

None.

Error Return

 See Identifying Return Indicators and Errors for information about how to check the error indicators. 

Programming Considerations

Examples

The following example deletes an index reference to a subfile (path 1 only).

dft_fil *file_ptr;
char member_number[10];

  ·
  ·
  ·
dfdix_alg_pth(file_ptr, 0, member_number, 1);

Related Functions