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 'TBLBASE' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            [PASSWORD
                            [GENERATION]].

C syntax

memcpy( tbCommArea.tbCommand, "DG", 2 );
TBLBASE( &tbParm, &tbCommArea, pWritePassword,
         nGeneration );

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 0003 subcode 1 occurs when attempting the command on a table that is open for read or write in the TSR of record.

Error 0003 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 0008 occurs when the GENERATION number specified for this table is invalid.

ERROR 0030 occurs if an incorrect write PASSWORD is used.

ERROR 0072 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

None