Examples of the KEYLEN parameter
Example 1
//DD4 DD DSNAME=JST,DISP=(NEW,KEEP),UNIT=3390,
// SPACE=(CYL,(12,2)),DCB=(A.B.C),KEYLEN=8
DD statement DD4 defines a new data set named JST and requests that the system copy the DCB information from the data set label of the cataloged data set named A.B.C. If the data set label contains a key length specification, it is overridden by the KEYLEN coded on this DD statement.
Example 2
//SMSDS3 DD DSNAME=MYDS3.PGM,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.