The following JCL code allows you to perform a full volume physical copy using the ADRDSSU utility:
//STEP1 EXEC PGM=ADRDSSU,REGION=0M
//SYSPRINT DD SYSOUT=*
//INVOL1 DD VOL=SER=volser1,UNIT=3390,DISP=SHR
//OUTVOL1 DD VOL=SER=volser2,UNIT=3390,DISP=SHR
//SYSIN DD *
COPY FULL -
INDDNAME(INVOL1) -
OUTDDNAME(OUTVOL1) -
ALLDATA(*) -
ALLEXCP -
CANCELERROR -
COPYVOLID -
ADMINISTRATOR -
PURGE
/*
Where:
volser1 = INPUT volume
volser2 = OUTPUT volume
JCL Explanation:
With the above JCL data from DASD volume volser1 is copied to DASD volume volser2.
ALLDATA(*) indicates that all allocated space in sequential or partitioned datasets, and in datasets with a dataset organization that is null, is to be copied.
COPYVOLID allows the volume serial number of the source volume (volser1) to be copied to the target volume (OUTVOL1). The result is that both volumes will have the same serial number.
ALLEXCP copies datasets even if they are empty.
CANCELERROR terminates the copy operation if a permanent read error occurs.
ADMINISTRATOR allows you to act as a DFSMSdss authorized storage administrator for the COPY command. This is an optional parameter.
PURGE specifies that unexpired data sets, which reside on the target volume, can be overlaid for a full copy operation. If you do not specify PURGE and unexpired data sets exist on the target volume, the copy operation fails. This is an optional parameter.
Be the first to comment