DD VOLUME Parameter


The VOLUME parameter is used to specify the name of the DASD (Direct Access Storage Device) volume on which a dataset is stored or is to be stored.

The volume can be private and is an optional parameter.

Syntax -

{VOL}=([PRIVATE][,RETAIN][,volume-sequence-number][,volume-count]
{VOL}=[SER=(serial-number[,serial-number]...)]
{VOL}=[REF=*[.stepname][.procstepname].ddname
PRIVATE Requests a private volume.
volume-sequence-number Specifies the unique number to identify the volume.
The volume sequence number is from 1 through 255.
The system assigns the first available volume with the requested space if it is not coded.
volume-count Specifies the maximum number of volumes.
A volume count is a decimal number from 1 through 255.
The total volume count for all DD statements in one job step cannot exceed 4095.
SER=(serial-number[,serial-number]...) Specifies the volume serial number.
A volume serial number is 1 through 6 characters.
Users can code 255 volume serial numbers on a DD statement.
*.ddname Specifies the system should get the volume from the previous ddname from previous steps.
*.stepname.ddname Specifies the system should get the volume from the previous ddname from previous stepname.
*.stepname.procstepname.ddname Specifies the system should get the volume from the previous ddname from previous stepname of the procstepname.

Examples -


Scenario - Defines a PDS on single volume.

//MATEPKP  JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1), 
//             NOTIFY=&SYSUID 
//* 
//STEP01   EXEC PGM=IEFBR14 
//DD1      DD DSN=MATEPK.TEST.PDS,
//            DISP=(NEW,CATLG,DELETE), 
//            SPACE=(TRK,(10,10,10),RLSE),
//            UNIT=SYSDA,VOLUME=SER=DEVHD4,
//            DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=800)