This example uses the ALLOCATE command to allocate a new data set.
Data class is not assigned, and attributes assigned through the default
data class are overridden by explicitly specified parameters. By providing
the SMS management class and storage class, you can take advantage
of attributes already assigned through the ACS routines.
//ALLOC JOB ...
//STEP1 EXEC PGM=IDCAMS,DYNAMNBR=1
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALLOC -
DSNAME(M166575.ALLOC.EXAMPLE) -
NEW CATALOG -
SPACE(10,2) -
AVBLOCK(80) -
AVGREC(K) -
LRECL(80) -
RECORG(ES) -
STORCLAS(FAST) -
MGMTCLAS(VSAM)
/*
The parameters are:
- DSNAME states that the name of the data set being allocated is
M166575.ALLOC.EXAMPLE.
- NEW creates the data set.
- CATALOG retains the data set by the system in the catalog after
step termination. This is mandatory for SMS-managed data sets.
- The SPACE parameter determines the amount of space to be allocated
to the new data set.
- The first amount (10) is the primary allocation. The second amount
(2) is the secondary allocation.
- Using AVGREC(K) determines that the amounts defined in the SPACE
parameter represent kilobytes (K) of records. In this example, the
primary allocation is 10K or 10240 records and the secondary allocation
is 2K or 2048 records.
- To determine the space allocation in bytes, multiply the number
of records by 80, the record length in LRECL(80). The primary allocation
is 819200 bytes. The secondary allocation is 163840 bytes.
- AVBLOCK is the average block length. This example uses an average
block length of 80 bytes.
- AVGREC determines whether the quantity in the SPACE parameter
represents units, thousands, or millions of records. "K" indicates
that the primary and secondary space quantities are to be multiplied
by 1024 (1 KB).
- LRECL says the logical record length in the data set is 80 bytes.
- RECORG shows entry-sequenced records in the new VSAM data set.
- STORCLAS gives an installation-defined name of an SMS storage
class to be assigned to this new data set. This storage class and
the ACS routines are used to determine the volume. This parameter
is optional. If it is not used, the data set assumes the default
storage class assigned by the ACS routines.
- MGMTCLAS shows an installation-defined name of an SMS management
class to be assigned to this new data set. The data set assumes the
migration and backup criteria assigned to this management class by
the ACS routines. This parameter is optional and, if not given, the
data set assumes the default management class assigned by the ACS
routines.