JCL DD KEYLEN

JCL – DD EXPDT JCL – DD LIKE

Advertisements


KEYLEN parameter used to specify the length of the key used in new dataset.

KEYLEN parameter is an optional parameter.

If KEYLEN is not specified, the dataset must not require any keys.

KEYLEN applies to data sets with the BDAM, BPAM, BSAM, EXCP and QISAM access methods and to VSAM data sets with SMS.

Syntax:

KEYLEN=bytes

bytes Specifies the key length in bytes.

Key length is 0 to 255 for non-VSAM data sets.

The key length must be less than or equal to the record length.

Key length is 1 to 255 for VSAM key-sequenced (RECORG=KS) data sets.

Note:

Use only 0 for a member of a partitioned data set extended (PDSE).

Example 1:

//DD01  DD    DSNAME=MTH.DATA,DISP=(NEW,KEEP),UNIT=3390,
//            SPACE=(CYL,(12,2)),KEYLEN=8

DD statement DD01 defines a new data set named MTH.DATA with the key length 8 bytes.


Example 2:

//DD01  DD  DSNAME=MTH.VDATA,DATACLAS=VSAM1,DISP=(NEW,KEEP),
//          KEYLEN=6

In the example, where the data class VSAM1 defines a key-sequenced VSAM data set, the key length of 6 overrides the key length defined in the data class.


JCL – DD EXPDT JCL – DD LIKE

Advertisements