Change Generations (CG)

Command title

Change Generations

Description

This command modifies the number of generations of a table to be kept.

COBOL syntax

MOVE 'CG'                   TO xxxx-COMMAND.
CALL 'TBLBASE' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            PASSWORD
                            NEW-GEN-NO.

C syntax

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

Parameters

PASSWORD—If the table is protected with a write password then the write password is required for this command.

NEW-GEN-NO—a positive number between 1 and 9.

Explanation

If the number of generations present exceeds the new number of generations to be kept, the appropriate number of the oldest generations of the table will be deleted.

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 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 ‘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