bdfp1m26Programming Concepts and Reference

DBDIX-Delete Index References to a Subfile

Use this macro to delete index references to the current subfile or a specific subfile. This macro removes the reference to a detail subfile without deleting the LREC in the detail file.

Format




REF=dsectvv
specifies the file or subfile that you want to access, where dsectvv is the DSECT name and an optional 2-character version.

REF=refname
specifies the file or subfile that you want to access, where refname is a label that references the DSECT name in one of the following formats:

refname
is the label of an 8-byte field that contains the 6-byte DSECT name and an optional 2-character version.

A/refname
is the label of a 4-byte field that contains the storage address of the DSECT name and an optional 2-character version.

FILE=dsect
specifies the file or subfile that you want to access, where dsect is the DSECT name.

R3=address
specifies the location of the SW00SR slot for this subfile, where address is the label of a field that contains the address of the SW00SR slot. Register 3 will be loaded with this address.
Note:
Do not use this parameter; it is provided only for migration purposes. Use the REF parameter to specify the file that you want to access.

ALG=algarg
identifies the subfile that you want to access, where algarg specifies an algorithm argument.

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.

Specify algarg as one of the following:

Note:
Do not modify the area of storage containing the algorithm argument until the subfile is closed.

ERROR=spmlbl
branches to the specified location if a serious error is detected when processing the macro, where spmlbl is a TPFDF structured program macro (SPM) label defined with the #LOCA macro. See TPFDF and TPF Structured Programming Macros for more information about the #LOCA macro. See Identifying Return Indicators and Errors for more information about serious errors.

ERRORA=asmlbl
branches to the specified location if a serious error is detected when processing the macro, where asmlbl is an assembler label. See Identifying Return Indicators and Errors for more information about serious errors.

NOPGM
specifies not to change the program stamp in a block when filing it.

PATH
specifies the path for a detail subfile using index support. If there is only one index path, do not specify this parameter. Specify one of the following:

pathnum
is the path number or the label of a 2-byte field that contains the path number. The number of index paths used is defined by your database administrator.

ALL
specifies all paths.

See TPFDF Database Administration for more information about path numbers.

Entry Requirements

Ensure that the relationship of the index file (or index files, if there are multilevel indexes) to the detail file have been defined on the DBDEF macro by your database administrator.

Normal Return

Fields SW00RTN and SW00RT2 are set to 0.

Error Return

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

Programming Considerations

Examples

The following example deletes all the LRECs in the subfile and any corresponding index LRECs, and releases the subfile. Any chained blocks are released and the prime block is initialized to empty (for a fixed file).

DBRED REF=GR23DF,ALG=EBW044
DBDEL REF=GR23DF,ALL,NOKEY
DBDIX REF=GR23DF,ALG=EBW044
DBCLS REF=GR23DF

Related Macros