In this example, the ALLOCATE command is used to allocate a new
data set. By providing the SMS data class, management class, and storage
class, you can take advantage of the attributes assigned by your storage
administrator through the ACS routines.
Although this example includes DYNAMNBR, it is not required in
this example. Because this example contains two DD statements, you
can do up to two allocations. DYNAMNBR is required only when the number
of allocations exceeds the number of DD statements. This example sets
DYNAMNBR to 1. This allows up to three allocations for each DD statement
(2) plus DYNAMNBR (1).
//ALLOC JOB ...
EC PGM=IDCAMS,DYNAMNBR=1
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALLOC -
DSNAME(ALX.ALLOCATE.EXAMP1) -
NEW CATALOG -
DATACLAS(STANDARD) -
STORCLAS(FAST) -
MGMTCLAS(VSAM)
/*
Because the system syntax checks and ignores SMS classes when SMS
is inactive, and because no overriding attributes are given, this
example works only if SMS is active. The parameters are:
- DSNAME states that the name of the data set being allocated is
ALX.ALLOCATE.EXAMP1.
- NEW creates a data set.
- CATALOG retains the data set by the system in the catalog after
step termination. This is mandatory for SMS-managed data sets.
- DATACLAS gives an installation-defined name of a data class to
be assigned to this new data set. The data set assumes the RECORG
or RECFM, LRECL, KEYLEN, KEYOFF, AVGREC, SPACE, EXPDT or RETPD, VOLUME,
CISIZE, FREESPACE, SHAREOPTIONS, and IMBED or REPLICATE parameters
assigned to this data class by the ACS routines. This parameter is
optional. If it is not used, the data set assumes the default data
class assigned by the ACS routines.
- 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 and, if not given, the data set assumes the default storage
class assigned by the ACS routines.
- MGMTCLAS is the 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.