JCL DD SPACE

JCL – DD RETPD JCL – DD SYSOUT

Advertisements


SPACE parameter used to request a space for new dataset.

The space should be requested on direct access volume.

SPACE parameter can also override space allocated for the dataset which is already created.

It can extend the space allocation for the dataset already created.

SPACE parameter has no advantage of using it for TAPE devices.

SPACE is optional parameter.


Syntax:

SPACE= ({TRK,}(primary-qty[,second-qty][,directory])[,RLSE][,CONTIG][,ROUND])
       ({CYL,}            [,          ]             [,    ][,MXIG  ]
       ({blklgth,}                                         [,ALX   ]
       ({reclgth,}                                         [,      ]

TRK/CYL:

Request the space in tracks or cylinders.


Block-length (blklgth):

Block length is used to specify the average block length in bytes.

Block length used to specify only when AVGREC parameter is not coded.

Block length allows from 0 through 65535.

Block length will get priority when BLKSIZE also specified in DCB parameter.


Record length (reclgth):

Record length is used to specify the average record length in bytes.

Record length used to specify only when AVGREC is coded with SMS active.

Record length allows from 0 through 65535.


Primary Qty (primary-qty):

Specifies the amount of primary space required for the data set.

Primary qty always be in terms of TRKS, CYLS, Block length and record length.

The specified volume must have enough space available which is requested in Primary. If enough space not available, the allocation job will be terminated.

Primary qty allows values from 0-16777215.

If block length specified as ZERO, then one of the below will consider as block size

  • Block size from the DCB parameter.
  • Block size determined from RECFM and LRECL on the DD Statement.
  • Default value of 4096.

Secondary Qty (secondary-qty):

Specifies the amount of additional space required for the data set.

Secondary qty always be in terms of TRKS, CYLS, Block length and record length.

System will not allocate the secondary space, until it is needed.

Secondary qty allows values from 0-16777215.

If block length specified as ZERO, then one of the below will consider as block size.


  • Block size from the DCB parameter
  • Block size determined from RECFM and LRECL on the DD Statement
  • Default value of 4096.

Secondary Qty is used to extend the memory for the datasets which are already created.

The extension can be done in below ways.


  1. If the DISP used as NEW or MOD, then the system trying to allocate the extended memory on the same volume itself.
  2. If the DISP used as OLD or SHR and no another volume specified during the allocation, then the system trying to allocate the extended memory on the same volume itself.
  3. If the DISP used as OLD or SHR and another volume specified during the allocation, then the system trying to allocate the extended memory on the another volume specified.

Directory:

Specifies the number of 256-byte records needed in the directory.

The directory is for partitioned data set (PDS) or partitioned data set extended (PDSE).

Directory allows values from 0-16777215.

The directory needs to specify during the PDS creation.


RLSE:

RLSE releases the memory allocated to the dataset when the dataset is closed.

RLSE function notifies the close function to release unused space on the dataset closes.

RLSE function supports sequential, partitioned and VSAM.

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

RLSE function does not affect primary and secondary allocation.

If the system can’t able to get the exclusive control of the dataset while closing the dataset, the system ignores a request to release unused space.


CONTIG:

CONTIG parameter specifies the memory allocated should be contagious.

CONTIG parameter applicable for primary memory allocation.

If the CONTIG option specified during the allocation and no contiguous space available then JOB will be terminated.


MXIG:

MXIG parameter specifies that the memory allocation should be done on the largest contiguous memory location.

If no contiguous memory location available, the system will check for primary quantity contiguous memory available at least.

MXIG parameter applicable only for primary memory allocation.


ALX:

ALX parameter specifies to the system that the memory to the dataset allocation is to up to 5 largest available locations on the same volume.

Each of the 5 areas size should be greater than or equal to primary quantity.

ALX parameter applicable only for primary memory allocation.


ROUNDED:

ROUNDED parameter only applicable when average block length specified.

ROUNDED parameter specifies that the memory allocation to the data set should be equal to the number specified in average block.

If TRK and CYLs specified, ROUNDED parameter will be ignored.


Example 1:

//DD01  DD  DSNAME=&&TEMPMTH,SPACE=(CYL,10)

The DD statement defines a temporary data set.


Example 2:

//DD02  DD  DSNAME=MTH.DATA,DISP=(,KEEP),UNIT=3390,
//          SPACE=(CYL,(10,,10),,CONTIG)

The system allocates 10 cylinders to the data set and the system allocates 10 contiguous cylinders on the volume because of the CONTIG sub parameter.


Example 3:

//DD01 DD  DSNAME=MTH.DATA,DISP=NEW,UNIT=3390,
//          SPACE=(ABSTR,(5,1))

In the above example, the SPACE parameter asks the system to allocate 5 tracks, beginning on the second track of the volume.


Example 4:

//DD01  DD  DSNAME=MTH.DATA,DATACLAS=DCLAS07,DISP=(NEW,KEEP),
//          SPACE=(256,(10,5)),AVGREC=K

In this example, the space allocation defined in the DCLAS07 data class is overridden by the SPACE and AVGREC parameters.


JCL – DD RETPD JCL – DD SYSOUT

Advertisements