The data set naming convention that is specified on the
DSN option of each TEMPLATE statement must be appropriate for the
data set that is being created. The data set naming convention must
also be coordinated with the other templates and DD statements in
the same job step.
About this task
The data set name must be both unique and meaningful. Db2 does not check that the data
set names are unique until the execution of the utility that references
the template. Ensure that the data set names are unique when you define
the data set naming convention on the TEMPLATE control statement.
Procedure
To choose a data
set name, apply the following guidelines:
- Use a combination of static characters, national characters,
and the provided variable names to form valid z/OS® data set qualifiers. Normal z/OS rules apply. Variables that produce numeric
values must be preceded by either a static character or a character
variable. All qualifiers must start with an alphabetic character.
The qualifiers must consist of a maximum of eight characters and a
maximum of 44 characters for the entire data set name. To help comply
with this 44 character limit, you can use variable substring notation.
- Use the two-character form of the DSN variables to save
space.
- Use two consecutive periods following all variables that
precede the last qualifier (one to terminate the variable, followed
by a second static period to separate the qualifiers), as in the following
example:
- Use &DB. and &TS. to relate the data set to a database
object.
- Use &PART.
when executing PARTLEVEL lists. Preceed the variable with a static
character or a character variable to form a valid qualifier.
- Use &JO. and &ST. to eliminate conflicts with other
jobs or job steps.
- Use &SS., &US., &UT., and &UN. if you have
a need to know the subsystem, member, user, utility ID, or name of
the utility that produced the data set.
- Use &DATE. and &TIME. or the shorter substring
variations to guarantee uniqueness. Preceed the variable with a static
character or a character variable to form a valid qualifier.
- Use &IC., &LR., and &PB. to identify image
copy data sets. For example, the following template name would make
a meaningful seven-character data set qualifier:
-
Use &DS for FlashCopy® image copies for
uniqueness when copying table spaces or index spaces at the space level.
What to do next
You
can check the data set names by using the PREVIEW function. In PREVIEW mode, Db2 expands all TEMPLATE data set names in the SYSIN
DD, in addition to any data set name from the TEMPLATE DD that are referenced on a utility control
statement. Db2 then prints the information
to the SYSPRINT data set and halts execution. You can specify PREVIEW in one of two ways, either as
a JCL PARM or on the OPTIONS PREVIEW utility control statement.