Copies a sequential data set, then deletes the original data set.
&CONTROL SHRVARS=($DS)
EXEC $DSCALL OPT=MOVE
FROMDSN=dataset_name
TODSN=dataset_name
This call is used to copy a sequential data set to another sequential data set using the IEBGENER utility and delete the original data set after the copy has completed.
Operands:
Specifies that the data set be copied then deleted.
Specifies the name of the data set to be moved.
Specifies the name of the data set to copy the data set specified in FROMDSN to.
Return Codes:
Note: For more information about &SYSMSG, &$DSRC, and &$DSFDBK, see Return Codes and Feedback Codes.
Example: OPT=MOVE
EXEC $DSCALL OPT=MOVE FROMDSN=SYS1.WORK.GO + TODSN=PROD1.CHANGE.GO
Note: Both the FROMDSN and TODSN data sets must be sequential and have the same record length and record format. Both data sets must exist prior to the call. If the copy function fails the FROMDSN data set is not deleted. This does not apply to PDSs.