In this example, a volume of data sets is moved to a disk volume.
All data sets that are successfully moved are scratched from the source
volume; however, any catalog entries pertaining to those data sets
are not changed. Space is allocated by IEHMOVE.
//MOVEVOL JOB ...
//STEP1 EXEC PGM=IEHMOVE
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD UNIT=disk,VOLUME=SER=222222,DISP=OLD
//DD1 DD UNIT=disk,VOLUME=SER=111111,DISP=OLD
//DD2 DD UNIT=disk,VOLUME=SER=222222,DISP=OLD
//DD3 DD UNIT=disk,VOLUME=SER=333333,DISP=OLD
//SYSIN DD *
MOVE VOLUME=disk=333333,TO=disk=222222,PASSWORD
/*
The control statements are discussed below:
- SYSUT1 DD defines the device that is to contain the work data
set.
- DD1 DD defines the system residence device.
- DD2 DD defines the device on which the receiving volume is mounted.
- DD3 DD defines a device on which the source volume is mounted.
- SYSIN DD defines the control data set, which follows in the input
stream.
- MOVE specifies a move operation for a volume of data sets and
defines the source and receiving volumes. This statement also indicates
that password-protected data sets are included in the operation.