JCL DD VOLUME

JCL – DD UNIT JCL - STEPLIB

Advertisements


VOLUME parameter used to identify the volume(s) on which the dataset resides or will reside.

The volume request for new datasets can be private volume, retention of the volume, volume by serial number or the volume that other datasets uses.

VOLUME is optional parameter.


Syntax:

{VOLUME} = ([PRIVATE] [,RETAIN] [,volume-sequence-number] [,volume-count]
{VOL   }              [,      ] [,                      ]

              [SER=serial-number                     ]
              [SER=(serial-number[,serial-number]...)]
          [,] [REF=dsname                            ]
              [REF=*.ddname                          ]
              [REF=*.stepname.ddname                 ]
              [REF=*.stepname.procstepname.ddname    ]

PRIVATE Requests a private volume.
RETAIN RETAIN has no effect on the handling of direct access volumes.
volume-sequence-number Specifies the volume of an existing multivolume data set.

The volume sequence number is a decimal number.

The volume sequence number from 1 through 255.

The first volume is identified as 1.

The volume sequence number must be less than or equal to the number of volumes on which the data set exists.

If the volume sequence number is not specified, the system will process the first volume.

For new data sets, the system ignores the volume sequence number.
volume-count Specifies the maximum number of volumes.

The 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
SER=(serial-number[,serial-number]...)
Specifies the volume serial number.

A volume serial number is 1 through 6 alphanumeric, national ($, #, @), or special characters.

If the number can be shorter than 6 characters.

User can code a maximum of 255 volume serial numbers on a DD statement.

The maximum number of volume serial numbers for a VSAM or SMS-managed data set is 59.

Do not specify duplicate volume serial numbers in a SER sub parameter.
REF=dsname
REF=*.ddname
REF=*.stepname.ddname
REF=*.stepname.procstepname.ddname
Specifies the system to obtain volume serial numbers from another dataset or an DD statement.
*.ddname Specifies the system to obtain the volume serial numbers from earlier DD statement.
*.stepname.ddname Specifies the system to obtain the volume serial numbers from DD statement in an earlier step stepname in the same job.
*.stepname.procstepname.ddname Specifies the system to obtain the volume serial numbers from a DD statement in a cataloged or in-stream procedure.

Example 1:

//DD01  DD  DSNAME=MTH.DATA,UNIT=SYSDA,DISP=OLD,
//       VOLUME=SER=64887

The DD statement requests an existing data set, which resides on the direct access volume, serial number 64887.


Example 2:

//DD02  DD  DSNAME=MTH.DATA,DISP=(MOD,KEEP),UNIT=(3390,2),
//       VOLUME=(,,,4,SER=(64887,64888))

The DD statement requests an existing data set, which resides on two volumes, serial numbers 64887 and 64888.


Example 3:

//DD3  DD  DSNAME=MTH.DATA,UNIT=3390

The DD statement defines a data set that is created and deleted in the job step and the statement makes a nonspecific volume request because of the VOLUME parameter ignored.


JCL – DD UNIT JCL - STEPLIB

Advertisements