The RENAME function may be used to change the name assigned to a file or database.
This document covers the following topics:
NAME is the new name to be assigned to the file. It is specified between apostrophes (for example, 'RESERVATIONS'). A maximum of 16 characters can be used.
FILE is the number of the file to be renamed: if specified as zero or omitted, the database is renamed.
When an error is encountered while the function is running, the utility prints an error message and terminates with user abend 34 (with a dump) or user abend 35 (without a dump).
If NOUSERABEND is specified, the utility will not abend after printing the error message. Instead, the message "utility TERMINATED DUE TO ERROR CONDITION" is displayed and the utility terminates with condition code 20.
The password of the file. This parameter is required if the file is password-protected.
The TEST parameter tests the operation syntax without actually performing the operation. Only the syntax of the specified parameters can be tested; not the validity of values and variables. See Syntax Checking with the TEST Parameter for more information on using the TEST parameter in ADADBS functions.
The name of file 2 is to be changed to "INVENTORY".
ADADBS RENAME FILE=2,NAME='INVENTORY'
The database is renamed to "RESERVATIONS".
ADADBS RENAME NAME='RESERVATIONS',FILE=0