The following example shows allocating a key-sequenced data set:
//DDNAME DD DSNAME=KSDATA,DISP=(NEW,KEEP),
// SPACE=(80,(20,2)),AVGREC=U,RECORG=KS,
// KEYLEN=15,KEYOFF=0,LRECL=250
Explanation of Keywords:
- DSNAME specifies the data set name.
- DISP specifies that a new data set is to be allocated in this
step and that the data set is to be kept on the volume if this step
terminates normally. If the data set is not system managed, KEEP is
the only normal termination disposition subparameter permitted for
a VSAM data set. Non-system-managed VSAM data sets should not be passed,
cataloged, uncataloged, or deleted.
- SPACE specifies an average record length of 80, a primary space
quantity of 20 and a secondary space quantity of 2.
- AVGREC specifies that the primary and secondary space quantity
specified on the SPACE keyword represents the number of records in
units (multiplier of 1). If DATACLAS were specified in this example,
AVGREC would override the data class space allocation.
- RECORG specifies a VSAM key-sequenced data set.
- KEYLEN specifies that the length of the keys used in the data
set is 15 bytes. If DATACLAS were specified in this example, KEYLEN
would override the data class key length allocation.
- KEYOFF specifies an offset of zero of the first byte of the key
in each record. If DATACLAS were specified in this example, KEYOFF
would override the data class key offset allocation.
- LRECL specifies a record length of 250 bytes. If DATACLAS were
specified in this example, LRECL would override the data class record
length allocation.
- The system determines an appropriate size for the control interval.