You can associate templates with Db2 utility data sets and with Db2 Admin Tool work data sets.
About this task
Many Db2 utilities support the use of
templates for data sets that they use. Those data sets are identified in the utility
statement by a DD name keyword. For example, REORG TABLESPACE has a DISCARDDN
keyword to identify the data set to use for discarded records. For these utility
keywords, you can specify either a DD name or a template name to identify the data
set. In Db2 Admin Tool, you can
associate a template with these DD name keywords.
The Db2 Admin Tool work data sets that support
the use of templates do so by using a template keyword. For example, the keyword ALDDL is used for
the work data set that the ALT function uses for the DDL that is extracted from the catalog.
Procedure
To associate a template with a utility DD name keyword or a Db2 Admin Tool template
keyword:
On the DB2 Administration Menu
(ADB2) panel, select
option 5, and press Enter.
On the Utility generation using LISTDEFs
and TEMPLATEs (ADB25) panel, specify the
TEMPLATE control table that contains the template definitions that you want to
use:
Specify option TU, and press Enter.
The Specify TEMPLATE Usage
(ADB25TU3) panel is displayed:
Note: For the CLONE template type, panel ADB25TU4 is displayed.
This panel indicates whether a template is actively associated with
a keyword and the template name. If a keyword is listed twice
(keyword 1 and keyword 2 ), that
keyword allows two parameters. For example, in the previous screen, COPYDDN
1 corresponds to the first parameter of the COPYDDN keyword and COPYDDN 2
corresponds to the second parameter of the COPYDDN keyword.
For
utility keywords (Template type = UTIL), a slash in
the USE column indicates that a TEMPLATE statement is to be generated for
any utility that supports templates for that keyword.
Optional:
To change the template type that is displayed, overwrite the value in the
Template Type field, and press Enter.
The following values are valid:
UTIL
Utility data set keywords that are used by Db2
utilities.
CHG
Non-utility data set keywords that are used by the Db2 Admin Tool Alter
(ALT) function, Db2 Object Comparison
Tool, or Change
Management.
MIG
Migrate data set keywords that are used by the Db2 Admin Tool migrate
function.
MISC
SYSPRINT data set keywords that are used by Db2 Admin Tool to
generate work statement lists (WSLs) online.
CLONE
Utility templates that are used for cloned table spaces.
To associate a template with a specific keyword, specify
? in the SEL column next to
the keyword, and press Enter.
The TEMPLATEs
(ADB25T) panel
displays a list of defined templates.
To select a template, specify a plus sign (+) in the
SEL column next to the template name, and press
Enter.
The Specify TEMPLATE Usage
(ADB25TU3) panel
includes a slash (/) in the Use column next to the
keyword for which you selected a template. The template name and any comments
are also displayed.
Repeats steps 5
and6 as
needed to assign other templates.