$DSCALL OPT=RENAME

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:

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


Copyright © 2009 CA. All rights reserved.