Rename Table (RN)

Command title

Rename Table

Description

This command changes the name of all generations of a table in a tableBASE library.

COBOL syntax

MOVE 'RN'                   TO xxxx-COMMAND.
CALL 'DK1TCALL' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            NEW-TABLE-NAME
                            [PASSWORD].

Parameters

NEW-TABLE-NAME

PASSWORD (optional)

Explanation

The library search list is used to find the first library containing the specified table.

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

A table with the new name must not already exist in that library.

If a write password has been defined for the table, then a write password is required 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

Change Name (CN)

NEW-TABLE-NAME (8 bytes)

STATUS-SWITCHES (8 bytes)

PASSWORD (8 bytes)