Examples of the VOLUME parameter
//DD1 DD DSNAME=DATA3,UNIT=SYSDA,DISP=OLD,
// VOLUME=(PRIVATE,SER=548863)The DD statement requests an existing data set, which resides on the direct access volume, serial number 548863. Since PRIVATE is coded, the system will not assign to the volume another data set for which a nonspecific volume request is made and will demount the volume at the end of the job.
//DD2 DD DSNAME=QUET,DISP=(MOD,KEEP),UNIT=(3390,2),
// VOLUME=(,,,4,SER=(96341,96342))The DD statement requests an existing data set, which resides on two volumes, serial numbers 96341 and 96342. The VOLUME volume count subparameter requests four volumes, if required. Thus, if more space is required, the system can assign a third and fourth volume.
//DD3 DD DSNAME=QOUT,UNIT=3390The DD statement defines a data set that is created and deleted in the job step. By omission of the VOLUME parameter, the statement makes a nonspecific volume request, thereby asking the system to assign a suitable volume to the data set.
//DD4 DD DSNAME=NEWDASD,DISP=(,CATLG,DELETE),UNIT=3390,
// VOLUME=SER=339006,SPACE=(CYL,(10,5))This new data set is assigned to volume serial number 339006, which is a permanently mounted volume on a particular 3390 Direct Access Storage. You can obtain the same space on the same volume in another way: instead of specifying the volume serial number and UNIT=3390, you can specify the device number of the particular 3390 device in the UNIT parameter.
//OUTDD DD DSNAME=TEST.TWO,DISP=(NEW,CATLG),
// VOLUME=(,,,3,SER=(333001,333002,333003)),
// SPACE=(TRK,(9,10)),UNIT=(3390,P)
//NEXT DD DSNAME=TEST.TWO,DISP=(OLD,DELETE)DD statement OUTDD creates a multivolume data set and catalogs it. If the data set does not require three volumes, it will reside on fewer volumes. DD statement NEXT then deletes the data set.
IEF285I TEST.TWO DELETED
IEF285I VOL SER NOS=333001,333003.
IEF283I TEST.TWO NOT DELETED
IEF283I VOL SER NOS=333002 1.
IEF283I TEST.TWO UNCATALOGED
IEF283I VOL SER NOS=333001,333002,333003. IEF285I TEST.TWO DELETED
IEF285I VOL SER NOS=333001,333002,333003.//SMSDS2 DD DSNAME=MYDS2.PGM,STORCLAS=SCLAS02,DISP=(NEW,KEEP),
// VOLUME=SER=(223344,224444)For new system-managed DASD data setsor data sets on a system-managed tape volume, the system uses the attributes in the storage class named SCLAS02 for the storage service level of the data set. Also, if the storage administrator has specified GUARANTEED_SPACE=YES in the storage class for DASD VOLUME=SER can be coded and the data set will reside on the specified volumes. (However, if space is not available on the volumes, the job step fails. Allocation also fails if the requested volumes aren't in any of the possible storage groups for the data set. For tape requests, the system always gets the tape request specified with a specific volume serial.) Installation-written automatic class selection (ACS) routines select the data class and management class.
//STEP1 EXEC PGM=....
//DD1 DD DSN=OLD.SMS.DATASET,DISP=SHR
//DD2 DD DSN=FIRST,DISP=(NEW,CATLG,DELETE),VOL=REF=*.DD1
//STEP2 EXEC PGM=...
//DD3 DD DSN=SECOND,DISP=(NEW,CATLG,DELETE),VOL=REF=*.STEP1.DD1DD1 in STEP1 identifies the original SMS-managed data set OLD.SMS.DATASET. DD2 in STEP1 and DD3 in STEP2 each create an SMS-managed data set using the attributes in the storage class associated with the original data set OLD.SMS.DATASET in DD1.