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

C syntax

memcpy( tbCommArea.tbCommand, "RN", 2 );
TBLBASE( &tbParm, &tbCommArea, pNewTableName,
         pWritePassword );

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

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)