Renames a cataloged data set.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=RENAME
DSN=dataset_name
NEWNAME=dataset_name
This call is used to rename a cataloged data set. Your product region issues an ENQ for both the old and new data set names before attempting to perform the request. If the new data set name already exists, or if the data set is in use, the request fails.
Operands:
Specifies that the data set be renamed.
Specifies the name of the data set to be renamed. No member name is specified.
Specifies the new name for the data set. No member name is specified.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Example: OPT=RENAME
EXEC $DSCALL OPT=RENAME DSN=SYS1.WORK.DEV01 + NEWNAME=SYS1.WORK.TEST12