ALLOCATE

Access method services identifies the verb name ALLOCATE and attaches the terminal monitor program (TMP) that runs Time Sharing Option (TSO) commands in the background. The ALLOCATE command should be used only to allocate new data sets to the job step. If you use ALLOCATE through access method services for anything else (the handling of SYSOUT data sets, for example), you can get unpredictable results. Refer to z/OS TSO/E Programming Guide for additional information on using this command. Table 1 separates the parameters to that you should use under access method services from the parameters that cause unpredictable results.

When ALLOCATE is used, the data set is allocated to the job step. If your job contains multiple allocations, you might need to use the DYNAMNBR parameter on the job control language (JCL) EXEC statement. DYNAMNBR establishes a control limit used by TMP when allocating a data set. The control limit is the number of data definition (DD) statements that are coded plus the value coded in DYNAMNBR. If you do not use DYNAMNBR, the system sets it to 0 (the default). If you code DYNAMNBR incorrectly, the system uses the default and issues a JCL warning message. See z/OS MVS JCL User's Guide for a description of how to code the DYNAMNBR parameter. For an example illustrating the use of DYNAMNBR, see Allocate a Data Set Using SMS Class Specifications: Example 1.

When you use the ALLOCATE command within access method services, you must use the data set naming conventions of the TSO Service Facility, where the default prefix is the userid:
  • If you do not want the userid to be prefixed as a high level qualifier to the data set name, enclose the data set name in quotes.
  • If the data set name is not enclosed in quotes, the userid will be added as the data set's high level qualifier.
The TSO environment established by Allocate will only be terminated at step end. This may affect applications running ALLOCATE via the PPI in which the step may continue to perform other processes and additional allocations.

For information about the naming conventions of TSO and other considerations when you use access method services commands from a TSO background job, see z/OS TSO/E User's Guide. For information about the USER parameter and its Resource Access Control Facility (RACF®) requirements, see z/OS MVS JCL Reference.

You can use the ALLOCATE command to define data set attributes in several ways:
  • You can use the Storage Management Subsystem (SMS) parameters STORCLAS, MGMTCLAS, and DATACLAS. You can either define these parameters explicitly, or you can let them default to use the parameters assigned by the ACS routines that your storage administrator defines. Contact your storage administrator for information about storage administration policies and about how the ACS routines might apply.

    You cannot override attributes that the STORCLAS and MGMTCLAS parameters assign. You can override attributes that the DATACLAS parameter assigns. For example, if you use both the DATACLAS parameter and the SPACE parameter, SMS assigns all the attributes defined in the DATACLAS, but uses the values you defined in the SPACE parameter when allocating the data set.

  • You can use the LIKE parameter to allocate a data set with the same attributes as an existing (model) data set. The model data set must be a cataloged data set. You can override any of the model data set attributes by stating them in the ALLOCATE command.
  • You can identify a data set and explicitly describe its attributes.