Subparameter definition
- PRIVATE
- Requests a private volume. Private means that:
- The system is not to allocate an output data set to the volume unless the volume is specifically requested, such as in a VOLUME=SER subparameter.
- If tape, the volume is to be demounted after the data set is closed, unless RETAIN is also coded or the DD DISP parameter specifies PASS.
- If a demountable direct access volume, the volume is to be demounted after the data set is closed.
- RETAIN
-
For a
private tape volume, RETAIN requests that this volume is not to be demounted or rewound after the
data set is closed or at the end of the step. For a public tape volume, RETAIN requests that this
volume is to be retained at the device if it is demounted during the job.
RETAIN has no effect on the handling of direct access volumes.
For JES3-managed tape devices, JES3 does not accept the RETAIN parameter after reaching the end of the job. However, if RETAIN is coded and the tape volume is to be shared with a later step, JES3 designates the volume as retained. JES3 also ignores the RETAIN parameter when issuing its KEEP/RETAIN messages.
- volume-sequence-number
-
Identifies the volume of
an existing multivolume data set to be used to begin processing the data set. The volume sequence
number is a decimal 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,
otherwise, the job fails.
If the volume sequence number is not specified, the system processes the first volume.
For new data sets, the system ignores the volume sequence number.
- volume-count
- Specifies the maximum number of volumes that an output
data set requires. 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.
DASD volumes cannot be removed from the drive. Therefore, the number of volumes for a data set is the same as the number of drives for the data set. This number cannot exceed 59.
For a tape data set, the number of volumes can be more or less than the number of drives. The number of drives cannot exceed 59. The number of volumes cannot exceed 255. The system uses the unit count to determine how many tape devices to allocate. However, if you also specify P (for parallel mount) in the UNIT parameter, the system might use the value that is specified for the volume count to determine how many devices and volumes to allocate. See the unit-count description in Subparameter definition.
Volume count and serial numbers:
When the volume count is greater than:- The number of volume serials that are coded in the SER sub parameter, OR
- The number of volume serials that the system retrieved from the catalog, OR
- The number of volume serials that the system retrieved from VOL=REF OR
- The number of volume serials that the system retrieved from a passed data set,

If a data set might need more volumes than the number of volume serials that are coded, specify a volume count equal to the total number of volumes that might be used. Requesting more volumes in the volume count ensures that the data set can be written on more volumes if it exceeds the requested volumes.
Volume count for nonspecific requests: If the request is for a nonspecific, public volume on a direct access device, the system ignores the volume count and allocates the number of volumes in the UNIT count subparameter. If the request is for a nonspecific, private volume, then the system acts as if a volume count greater than one was coded, and allocates the number of volumes that are given in the volume count.
Volume count for system-managed DASD data sets: You cannot specify a volume count for an existing system-managed DASD data set. (If you do, the system ignores it.) When you create a new system-managed DASD data set, the volume count defined in the data class might be overridden by using the volume-count subparameter. However, if the volume-count subparameter specifies a value greater than 59, the system sets the volume count to a maximum of 59. The maximum volume count for a VSAM or System-Managed DASD data set is 59.
Volume count for tape data sets: The
volume count is the upper limit for the number of volumes on which the data set can reside. The
maximum value is 255. When creating a new data set, if you do not specify a volume count on the
volume-count subparameter on the DD statement and the data set has a data class, the system will use
the volume count in that data class. If the data class does not have a volume count defined, then
the system allows a maximum of 255 volumes.
When your job extends the data set to
another volume, the system extracts the volume count from the data class as the data class is
defined. If your data set does not have a data class or the data class has no volume count, then the
system uses a maximum count of 255. 
When extending an existing data set, if you
do not specify a volume count on the volume-count subparameter of the DD statement, then the system
allows a maximum of 255 volumes. 
The system allows a data set to reside on more
volumes than specified on the volume-count subparameter or the data class volume count, but never
more than 255 volumes. If the volume count is 1 through 5, then the maximum number of volumes is 5.
If the volume count is greater than 5, then the maximum number of volumes is 5 plus a multiple of 15
volumes. For example, if the volume count is 6 through 20, then the maximum number of volumes is 20.
If the volume count is 21 through 35, then the maximum number of volumes is 35. 
Volume count for system-managed tape data sets: If you specify a volume count and DISP=PASS on a DD statement, the system passes the volume count to subsequent receiving steps within the job. This might cause the system to allocate more devices than expected to the receiving DD. Coding UNIT=AFF in the receiving step's DD results in the optimum number of devices being allocated to the receiving DD. For more information about the number of devices allocated, see z/OS MVS JCL User's Guide.
- SER=serial-number
- SER=(serial-number[,serial-number]...)
- Identifies by serial number the volume(s) on which the data set
resides. A volume serial number is 1 through 6 alphanumeric, national ($, #, @), or special
characters; enclose a serial number that contains special characters, other than hyphens, in
apostrophes. If the number is shorter than 6 characters, it is padded with trailing blanks.
You 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 subparameter. Each volume must have a unique volume serial number, regardless of whether it is a tape or disk volume.
Do not code a volume serial number as SCRTCH, PRIVAT, or Lnnnnn (L with five numbers); these are used in messages to ask the operator to mount a volume. SCRTCH is used when the data set being created on the non-specific volume is temporary [DISP=(NEW,DELETE) or DSN=&&tempname]. PRIVAT is used for all other cases of non-specific volumes. Lnnnnn is used by the system to represent the volume serial number of an NL (unlabeled) tape. Do not code a volume serial number as MIGRAT, which is used by the Hierarchical Storage Manager DFSMShsm for migrated data sets.
See the SPACE parameter for more information about space allocation.
Some printers might not be able to print certain special characters. Consider this when using special characters as part of a volume serial number.
For a permanently mounted direct access device, such as a 3390 Direct Access Storage, specifying a volume serial number and UNIT=3390 has the same result as specifying a device number in the UNIT parameter.
For new SMS-managed
DASD
data sets: For an SMS-managed
DASD
data set, code the SER subparameter only if the storage administrator has specified
GUARANTEED_SPACE=YES in the storage class of the data set. In this case, SMS uses the volumes that
you explicitly specify. If it is unable to do so, the allocation fails. The volume serial numbers
must be assigned to the same storage group. If GUARANTEED_SPACE=YES is not in effect, SMS ignores
any volume serial numbers that you specify for new SMS-managed data sets.For SMS-managed library tape volumes: For SMS-managed Library Tape volume, the Guaranteed Space storage class attribute is ignored and the system allocates to the specified volume.
For existing data sets:- If you do not specify a volume serial number and you specify an SMS-managed or cataloged data set: the system allocates the data set to the volume on which it resides.
- If you specify a non-SMS-managed volume serial number: the system allocates the data set on the volume that is specified, regardless of whether there is a cataloged or SMS-managed data set of the same name elsewhere. If there is no data set with the specified name on the volume that is specified, the allocation request completes but a later request to OPEN the DD fails.
- If you specify an SMS-managed
DASD
volume serial number: the system
finds and allocates the data set to the volume on which it resides, even if that is different from
the volume specified. If there is no SMS-managed
DASD
data set with the
specified name, the allocation request fails. - When multiple DD statements in the same step for the same SMS-managed DASD data set are
specified: if DISP=MOD is specified, or the OPEN macro is issued with the EXTEND or OUTINX
option, a data integrity exposure occurs when the data set is extended on additional volume(s). This
new volume information is not available to the other DD statements in the job step for the same data
set. The data on one or more new volumes is overlayed if the data set is opened for output
processing using one of the other DD statements in the same job step and the data set is again
extended.
Recommendation: Have only one DD statement per step for a data set that might need to extend to a new volume.
- When two data sets, one that is SMS-managed and one that is not, share the same data set
name:
- If you specify the non-SMS-managed volume, the system allocates the non-SMS-managed data set.
- If you do not specify the volume information, or you specify an SMS-managed volume, the system allocates the SMS-managed data set.
- REF=dsname
- REF=*.ddname
- REF=*.stepname.ddname
- REF=*.stepname.procstepname.ddname
-
Tells the system to obtain volume serial numbers from another
data set or an earlier DD statement. Note:
VOL=REF obtains the volume serial numbers from the referenced data set or earlier DD statement. VOL=REF might also obtain the label type as described under the LABEL parameter. See LABEL parameter for more information. No other information is retrieved by VOL=REF; in particular it does not obtain the volume sequence number, volume count, or data set sequence number.
- dsname
- Names a cataloged or passed data set. The system assigns this data set to the same volumes
containing the cataloged or passed data set.
When dsname names a passed data set, the reference must appear on a DD statement before the receiving DD statement. (After a passed data set is received, the passed data set information is no longer available.)
When the dsname contains special characters other than the periods used in a qualified name, enclose it in apostrophes.
The dsname can be an alias name or a catalog name. The dsname cannot be a generation data group (GDG) base name or a member name of a non-GDG data set.
If the referenced cataloged data set is migrated, it is recalled before assigning the volumes to the data set.
- *.ddname
- Asks the system obtain the volume serial numbers from an earlier DD statement with the name ddname in the same job step.
- *.stepname.ddname
- Asks the system to obtain the volume serial numbers from a DD statement with the name ddname, in an earlier step with the name stepname, in the same job.
- *.stepname.procstepname.ddname
- Asks the system to obtain the volume serial numbers from a DD statement in a cataloged or in-stream procedure. Stepname is the name of the job step that calls the procedure, procstepname is the name of the procedure step that contains the DD statement, and ddname is the name of the DD statement.
Referenced data set not opened: When REF refers to a DD statement in a previous step and the data set was not opened, the system allocates a device that has the widest range of eligibility to meet both DD statement requests. Thus, the system might allocate a device for which the referring data set is not eligible. To prevent this problem for tape data sets, always code the DCB DEN subparameter, or the DCB TRTCH subparameter on a DD statement that you plan to reference.
References to multivolume tape data sets: When REF refers to a data set residing on more than one tape volume, the system allocates all volumes to the referencing DD when it represents an OLD data set, that is, a data set that existed before the current job step. For a NEW tape data set the system allocates only the last volume of a referenced multivolume tape data set.
If an earlier job step extends the referenced data set to more volumes, or adds or extends an earlier data set so that the referenced data set resides on a later volume, the new volume information is available to the referencing DD statement.
If the current job step extends the referenced data set to more volumes, or adds or extends an earlier data set so that the referenced data set resides on a later volume, the new volume information is available to the referencing DD statement ONLY when the referenced data set is a new data set with no volume serial numbers explicitly or implicitly specified, which means only if the entire collection of data sets on the volumes was created in the current step. In other words, if the current job step extends the referenced data set to more volumes, or adds or extends an earlier data set so that the referenced data set resides on a later volume, the new volume information is not available to the referencing DD statement when either of the following conditions is true:- The data set that is referenced (directly or through a chain of references) existed before the start of the step containing the reference.
- The data set that is referenced (directly or through a chain of references) is a new data set requested with specific volume serial numbers. However, the new volume is resolved if one unit is allocated when writing multifile, multivolume labeled data sets leaving the tape positioned at the end of each data set created.
If the referenced data set already exists and has volume serial numbers that are explicitly specified, then the last listed volume serial is used even if the earlier data set exists on or is written to fewer volumes.
If the referenced data set is new and has specific volume serials, then the last listed volume serial is used even if the data set is written with fewer volumes.
In either of these cases, the allocation of the referencing data set is likely to fail.
References to multivolume direct access data sets: When REF refers to a data set that resides on more than one direct access volume, the system allocates all of the volumes.
If a DD statement that is requesting a new data set has a unit count and volume count greater than one but specifies no volume serial numbers, one volume is allocated. If a second DD statement within the same step requests the same data set, the same volume is allocated to it. If this job step extends the data set to more volumes, this new volume information is not available to the second DD statement.
Two or more DD statements in the same step can request the same data set. However, if the data set is extended to additional volumes in that step, the additional volume information is not available to the second or succeeding DD statements within the step.
References to DD statements with UNIT group names: When REF refers to a DD statement containing a UNIT group-name subparameter, the system allocates a device of the same type that is actually used for the referenced data set, but not necessarily a device in the referenced group-name.
References to VSAM data sets: When REF refers to a multivolume VSAM data set, the system allocates a device of the same type as the first device type that is used for the referenced VSAM data set.
References to SMS-managed data sets: When REF refers to an SMS-managed data set, SMS manages the new data set using the storage class of the referenced data set, if it is available, and applies these rules:- If the reference is to a data set on one or more SMS-managed tape volumes, then the two data sets must be assigned to the same storage group. If the automatic class selection (ACS) routine does not assign the same storage group to the referenced and referencing data sets, the allocation fails with message IGD304I.
- For references to data sets on SMS-managed media other than tape, the two data sets must be assigned to compatible types of storage groups. This ensures the consistency for locate requests. For example, if the referenced data set is on DASD, allocating the referencing data set to be allocated on tape could result in potential locate request errors. If the ACS routine does not assign compatible types of storage groups to both data sets, the allocation fails with message IGD318I.
- Specify a SPACE parameter on the referencing DD or in the derived data class when it refers to an SMS-managed DASD data set.
References to non-SMS-managed data sets: When REF refers to a non-SMS-managed data set, the ACS routine receives control and can do one of two things:- Allow the allocation to proceed as a non-SMS-managed data set.
- Fail the allocation by exiting with a nonzero return code.
If the ACS routine attempts to make the referencing data set SMS-managed, SMS fails the allocation with message IGD305I.
Do not refer to in-stream data sets: Do not refer to a DD *, DD DATA, or DD SYSOUT statement. The system ignores the reference and defaults the device name to SYSALLDA, which is the group name for all direct access devices that are defined to the system.
References to DUMMY data sets: If ddname refers to a DD DUMMY statement, the data set for this DD statement is also assigned a dummy status.