DD BLKSIZE Parameter
DD BLKSIZE Parameter
Note! BLKSIZE parameter is required only when we are creating a dataset.
The BLKSIZE (Block Size) parameter is used to specify the maximum physical block size that is used while reading or writing a dataset. The physical block size is the number of bytes that are reading from or writing to the storage device at a time.
BLKSIZE is an optional parameter.
Syntax -
//DDname DD DSN=datasetname,DISP=disp,DCB=(BLKSIZE=value)
Detailed Syntax -
BLKSIZE={value}
{valueK}
{valueM}
{valueG}
Value | Value is used to specify the storage in bytes. The value is the 10-digit value from 1 through 2,147,483,648 (2096128KB or 2047MB or 2GB). ValueK value should be multiples of 4. |
ValueK | ValueK is used to specify the storage in Kilobytes. The value is the 7-digit value from 1 through 2096128KB (2047MB or 2GB). ValueK value should be multiples of 4. |
ValueM | ValueM is used to specify the storage in Megabytes. The value is the 4-digit value from 1 through 2047MB (2GB). ValueM value should be multiples of 4. |
ValueG | ValueG is used to specify the storage in Gigabytes. The value is from 1 through 2GB. |
Guidelines to set BLKSIZE -
- For PS, the value of BLKSIZE should be set to a multiple of the record length (LRECL) to avoid wasted space.
- For PDS, the value of BLKSIZE should be set to a multiple of 4096 bytes.
Default and overrides -
If the BLKSIZE is not coded, the system will determine the optimum block size. If a none zero value is coded, it overrides the block size specified in the label.
Examples -
Scenario - Defining a PS file with fixed-length records with block size of 1600 bytes.
//NEWPS DD DSN=MTH.DATA.PSFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(3,2),RLSE),
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=1600)