System assignment of space

TRK
Requests that space be allocated in tracks.
CYL
Requests that space be allocated in cylinders.
blklgth — (only if AVGREC is not coded)
Specifies the average block length of the data, in bytes. The blklgth is a decimal number from 0 through 65535. This parameter indicates that the values specified for primary-qty and second-qty are block quantities, and directs the system to compute the number of tracks to allocate using a block length. The value specified for block size uses block length in this computation, with the exception of the value zero. See primary-qty and second-qty descriptions for how a zero block size is handled.
reclgth — (only if AVGREC is coded and SMS is active)
With SMS, specifies the average record length of the data, in bytes. The reclgth is a decimal number from 0 through 65535. This parameter indicates that the values specified for primary-qty and second-qty are record quantities, whose average record length is reclgth. If you specify zero, no space will be allocated.
The system allocates DASD space in whole tracks. The number of tracks required depends on how the records are blocked. The system uses one of the following as the block length to compute the number of tracks to allocate, in the order indicated:
  1. The block size from the DCB parameter, if specified.
  2. The system determined block size, if available.
  3. A default value of 4096.
primary-qty

Syntax allows for values of 0-16777215. Actual allowances will vary depending on physical and other environmental variables.

Specifies one of the following:
  • For TRK, the number of tracks to be allocated.
  • For CYL, the number of cylinders to be allocated.
  • For a block length, the number of data blocks in the data set.
  • For a record length, the number of records in the new data set. Use the AVGREC parameter to specify that the primary quantity represents units, thousands, or millions of records.
Note: When you specify TRK or CYL for a partitioned data set (PDS or PDSE), the primary quantity includes the space for the directory. When you specify a block length or record length for a partitioned data set (PDS or PDSE), the primary quantity does not include the directory space; the system assigns the directory to space outside the primary space assignment.

If the data set does not have the space constraint relief option, one volume must have enough available space for the primary quantity. If you request a particular volume and it does not have enough space available for your request, the system terminates the job step. In order for a data set to have the space constraint relief option, it must be SMS-managed and the data class must specify the option.

If you specify a blklgth of zero for the first subparameter, the system uses one of the following as the block length to compute the number of tracks to allocate, in the order indicated:
  1. The block size from the DCB parameter, if specified
  2. The block size determined from RECFM and LRECL on the DD statement or data class, if available
  3. A default value of 4096.

To request an entire volume, either code the ALX parameter or specify in the primary quantity the number of tracks or cylinders on the volume minus the number used by the volume table of contents (VTOC), volume label track, VTOC index, and VVDS (if any). The volume must not contain other data sets.

second-qty

Syntax allows for values of 0-16777215. Actual allowances will vary depending on physical and other environmental variables.

Specifies the number of additional tracks, cylinders, blocks, or records to be allocated, if more space is needed. The system does not allocate additional space until it is needed.

With SMS, use the AVGREC parameter to specify that the secondary quantity represents units, thousands, or millions of records. The system computes the number of tracks to allocate using a block length as indicated in the following order:
  1. The block size from the DCB parameter, if specified
  2. The system determined block size, if available
  3. A default value of 4096.
If the first subparameter specifies the average block length, the system computes the number of tracks for the secondary quantity from the second-qty number and one of the following, in order:
  1. The blklgth subparameter of the SPACE parameter.
  2. The saved average block length value specified when the data set was created, if no SPACE parameter was specified for an existing data set.
  3. The block length in the BLKSIZE field of the data control block.
When you specify a secondary quantity and the data set requires additional space, the system allocates the specified quantity:
  • In contiguous tracks or cylinders, if available.
  • If not available:
    • If the data set does not have the space constraint relief option, in up to five extents.
    • With the space constraint relief option, the system might have to allocate more than five new extents. A data set has this option only if it is SMS-managed and the data class specifies the option.

The system can allocate up to 123 extents for a data set on a volume if it is a PDSE, an HFS data set, an extended format data set, or a VSAM data set in a catalog. For other types of data sets the system can allocate up to 16 extents for each data set on each volume. An extent is space that may or may not be contiguous to other space allocated to the data set. The extents for a data set include the primary quantity space and user-label space.

Note: BDAM data sets cannot be extended.
When your program has filled a sequential data set’s allocated space on a volume, the system determines where the following data is written as follows:
  • If the disposition of the data set is NEW or MOD and the limit on the number of extents on a volume has not been reached, the system attempts to allocate the secondary quantity on the same volume.
  • If the disposition of the data set is OLD or SHR, the system examines the next volume specified for the data set.
    • If space has been allocated on the next volume for the data set, the next volume is used for the data set.
    • If space has not been allocated on the next volume for the data set, secondary space is allocated on the next volume for the data set.

    If there is not another volume specified for the data set, the system attempts to allocate the secondary quantity on the current volume.

    Note that your program should not write with a disposition of DISP=SHR unless you take precautions to prevent other programs from writing at the same time.

If the requested volumes have no more available space and if at least one volume is demountable, the system asks the operator to mount scratch (nonspecific) volumes until the secondary allocation is complete. If none of the volumes are demountable, the system abnormally terminates the job step.

directory
Specifies the number of 256-byte records needed in the directory of a partitioned data set (PDS). Syntax allows for values of 0-16777215.
Note:
  1. When creating a partitioned data set (PDS), you must request space for a directory.
  2. When creating a partitioned data set extended (PDSE), the size of the directory grows dynamically as needed. SMS uses the size requested for a PDSE directory only if you later convert the PDSE to a PDS.
  3. When creating a hierarchical file system (HFS) data set, you must specify the number of directory blocks to indicate that this is an HFS data set, but the value has no effect on allocation.

The PDS directory must fit in the first extent of the data set. If the primary quantity is too small for the directory, or if the system has allocated the primary quantity over multiple extents and the first extent is too small for the directory, then the allocation fails.

With SMS, you can specify the number of directory records on the SPACE parameter without specifying any other subparameters. For example:
   //DD12  DD   DSNAME=PDS.EXMP,DATACLAS=DCLAS12,SPACE=(,(,,20)),
   //         DISP=(NEW,KEEP)

specifies 20 directory records for the data set. In this example, the number of specified directory records (20) overrides the number of directory records defined in the data class of the data set. (SMS uses all other space allocation attributes defined in the data class of the data set.)

RLSE (Partial Release)
Requests that space allocated to an output data set, but not used, is to be released when the data set is closed. This partial release parameter causes the close function to release unused space only if the data set is open to allow writing and the last operation was not a read or a POINT macro.

For a multi-volume sequential data set, RLSE releases unused space on the current volume and any subsequent volumes when the data set is closed. This is also valid if the data set is GUARANTEED SPACE.

If you specify RLSE and an abnormal termination occurs, the system does not release unused space even though the data set is open.

RLSE is supported only for sequential, partitioned, and VSAM extended format data sets.

Coding RLSE for primary allocation does not prohibit use of secondary allocation. The secondary request for space is still in effect.

The system ignores a request to release unused space when closing a data set if it cannot immediately obtain exclusive control of the data set. Circumstances that would preclude obtaining exclusive control include:
  • Another job is sharing the data set.
  • Another task in the same multitasking job is processing an OPEN, CLOSE, EOV, or FEOV request for any other data set.
  • Another data control block is open for the data set.

The RLSE subparameter is ignored when TYPE=T is coded in the CLOSE macro instruction.

When coding RLSE for an existing data set, code the unit of measurement and primary quantity as they appeared in the original request. For example, if the original request was:
   SPACE=(TRK,(100,50))
you can release unused tracks when you retrieve the data set by coding:
   SPACE=(TRK,(100),RLSE)
You can release space in the following additional ways other than by deleting the data set:
  • Partial release option in the management class
  • DFSMShsm space management cycle
  • PARTREL macro issued by an authorized program.
CONTIG
Requests that space allocated to the data set must be contiguous. This subparameter affects only primary space allocation.

If CONTIG is specified and contiguous space is not available, the system terminates the job step.

MXIG
Requests that space allocated to the data set must be (1) the largest area of available contiguous space on the volume and (2) equal to or greater than the primary quantity. This subparameter affects only primary space allocation.

Caution: IBM® recommends that you use extreme care when coding this parameter. Large amounts of storage could be allocated, depending on how much free space is available at the time the request is made. If you code this parameter, IBM recommends that you also code the RLSE parameter to release any unused space.

ALX
Requests that space allocated to the data set is to be up to 5 of the largest areas of available contiguous space on the volume, and each area must be equal to or greater than the primary quantity. The system allocates fewer than 5 areas only when 5 areas of sufficient size are not available. ALX affects only primary space allocation.

For example, assume the following space extents (in tracks) are available: 910, 435, 201, 102, 14, 12, and 8.

If your job requests 14 tracks as its primary allocation, and ALX is in effect, the job receives the following 5 extents: 910, 435, 201, 102, and 14.

However, if the job requests 15 tracks as its primary allocation, it would receive 4 extents: 910, 435, 201, and 102. The job does not receive the 14-track extent because it is less than the primary space allocation.

Caution: IBM recommends that you use extreme care when coding this parameter. Large amounts of storage could be allocated, depending on how much free space is available at the time the request is made. If you code this parameter, IBM recommends that you also code the RLSE parameter to release any unused space.

ROUND
When the first subparameter specifies the average block length, requests that space allocated to the data set must be equal to an integral number of cylinders. If the first subparameter specifies TRK, or CYL, the system ignores ROUND.