You can use a list of objects that was defined with a LISTDEF
control statement as a target object for another utility.
Procedure
To reference LISTDEF lists in other utility jobs:
- Specify LISTDEF control statements to define the lists
of objects.
You can specify these LISTDEF
statements in one of the following places:
- In the SYSIN DD statement before the utility control statement that references it
Example:
//SYSIN DD *
LISTDEF MYLIST INCLUDE TABLESPACES DATABASE PAYROLL
INCLUDE INDEXSPACES DATABASE PAYROLL
- In one or more LISTDEF library data
sets
Example:
//*------------------------------------------------------
//* Create an input data set.
//*------------------------------------------------------
//LOAD1 EXEC PGM=IEBGENER
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//SYSUT2 DD DSN=JULTU103.TCASE.DATA2,
// DISP=(NEW,CATLG,CATLG),
// UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=2400)
//SYSUT1 DD *
LISTDEF NAME1 INCLUDE TABLESPACE DBLT0301.TLLT031A
INCLUDE TABLESPACE DBLT0301.TSLT031B
Any LISTDEF statement that is defined within the SYSIN DD statement overrides another
LISTDEF definition of the same name in a LISTDEF library data set.
- If you want to reference a list that is defined in a LISTDEF
library data set, use the OPTIONS utility. In the SYSIN DD statement
before the utility control statement that references the list, specify
OPTIONS LISTDEFDD with the name of the LISTDEF library.
Example:
//*******************************************************
//* QUIESCE LISTDEF DD LILSTDEF data sets
//*******************************************************
//STEP1 EXEC DSNUPROC,UID='JULTU103.QUIESC2',
// UTPROC='',SYSTEM='SSTR'
//LISTLIB DD DSN=JULTU103.TCASE.DATA2,DISP=SHR
//SYSIN DD *
OPTIONS LISTDEFDD LISTLIB
- In the utility control statement, specify the LIST keyword
and the list name.
For example, you can use the
QUIESCE utility to quiesce all objects in a list by specifying the
following control statement:
QUIESCE LIST list-name
Some utilities such as COPY and RECOVER, can process a LIST
without a specified object type. Object types are determined from
the list contents. Other utilities, such as REPORT, RUNSTATS, and
REORG INDEX, must know the object type that is to be processed before
processing can begin. These utilities require that you specify an
object type in addition to the LIST keyword (for example: REPORT RECOVERY
TABLESPACE LIST, RUNSTATS INDEX LIST, and REORG INDEX LIST). See the
syntax diagrams for an individual utility for details.
Results
In general, utilities process the objects in the list in the order in which they are
specified. However, some utilities alter the list order for optimal processing. The following table
shows the utilities that support the LIST keyword and how each utility processes the
list.
Utility |
Order of list processing |
CHECK INDEX |
Items are grouped by related table space. All index spaces that are
related to a particular table space are processed at one time, regardless of list order. |
COPY |
Items are
processed in the specified order on a single call to COPY. The PARALLEL keyword is supported for a
list, but if used, the order of processing is determined by Db2. |
COPYTOCOPY |
Items are processed in the specified order on a single call to
COPYTOCOPY. |
MERGECOPY |
Items are processed in the specified order. |
MODIFY RECOVERY |
Items are processed in the specified order. |
MODIFY STATISTICS |
Items are processed in the specified order. |
QUIESCE |
All items are processed in the specified order on a single call to
QUIESCE. |
REBUILD |
Items are grouped by related table space. All index spaces that are
related to a particular table space are processed at one time, regardless of list order. |
RECOVER |
Items are processed in the specified order on a single call to
RECOVER. |
REORG |
Items are
processed in the specified order with one exception. Items at the partition level are grouped by
table space when the first partition of a particular table space is encountered. Those partitions
are processed on a single call to REORG. |
REPORT |
Items are processed in the specified order. |
RUNSTATS INDEX |
Items are grouped by related table space. All index spaces that are
related to a particular table space are processed at one time, regardless of list order. |
RUNSTATS TABLESPACE |
Items are processed in the specified order. |
UNLOAD |
Items at
the partition level are grouped by table space. All specified partitions of a particular table space
are processed at one time, regardless of list order. |