Using dsname or pathname allocation

The major function performed by dynamic allocation, and the function most often requested, is that of dynamically allocating a data set or z/OS® UNIX file according to its name (dsname or pathname). Dynamic allocation by dsname or pathname is equivalent to data set or file allocation during job step initiation, except that the resource is allocated as your program runs.

Before using dsname or pathname allocation, you should ensure that the service you need is available through dynamic allocation. You can request most of the JCL facilities that you can code in a DD statement – such as data set disposition, volume label information, expiration date, and SYSOUT destination – by specifying the appropriate text units in the parameter list. However, some JCL facilities do not have dynamic allocation equivalents. These facilities are described in JCL DD statement facilities not supported by dynamic allocation.

Consult the detailed description of each text unit key (see SVC 99 parameter list verb codes and text units, by function) for the capabilities supported by the key. The system might support a JCL subparameter but not support all values of that subparameter. For example, the system might support DCB=DSORG without supporting DCB=DSORG=IS.

After you have determined that you can use dsname allocation to fulfill your request, you might be concerned about doing it efficiently. You make the most efficient use of dsname allocation processing when you reuse existing allocations. Consider the following questions:

If the answers to all the questions above are "no," the system uses a new allocation to satisfy your request, as described in Using a new allocation to fulfill a dsname or pathname allocation request. Allocating a new resource requires more processing than using an existing one, and so is less efficient.