Delete Generation (DG)

Command title

Delete Generation

Description

This command deletes one generation of a table on the library.

COBOL syntax

MOVE 'DG'                   TO xxxx-COMMAND.
CALL 'DK1TCALL' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            [PASSWORD
                            [GENERATION]].

Parameters

PASSWORD—If the table has been defined with a write password, then it must be specified as the third parameter of this command.

GENERATION—If the GENERATION parameter is omitted, the most current generation is deleted.

Explanation

The generation is deleted from the first of the concatenated libraries in which the table is found. For more information on “concatenated libraries” see Modify Library Search Order (ML).

Return value

Error code 03 subcode 1 occurs when attempting the command on a table that is open for read or write in the TSR of record.

Error code 03 subcode 10 occurs when attempting the command on a table that is open for read or write in the local TSR when the TSR of record is a VTS-TSR.

Error code 08 occurs when the GENERATION number specified for this table is invalid.

Error code 30 occurs if an incorrect write PASSWORD is used.

Error code 72 occurs if the table is open for write in a VTS-TSR or in a different region, when the TSR or record is the local TSR and the ‘Wait for Enqueued Table’ SWITCHES setting is set to N.

Notes

The table must be closed in the TSR of record for this command.

If the generation number is to be specified for a table that has no write password, then a dummy third argument must be provided as a placeholder in the parameter list.

If the ‘Wait for Enqueued Table’ SWITCHES setting is set to Y and the command is executed with the TSR of record being the local TSR and after the table has been opened for write in a VTS-TSR, it is possible that the application will never stop waiting as the enqueue was created by the same application.

Exceptions

None

See also

PASSWORD (8 bytes)

GENERATION (fullword binary)

STATUS-SWITCHES (8 bytes)