LIST—Process a List of Objects

The LIST keyword specifies a list of objects to process.
cafrdb219
The LIST keyword specifies a list of objects to process. For a RECOVER statement, the list can contain a mix of tablespaces and indexspaces. For a REBUILD statement, the list must contain either all tablespaces or all indexspaces.
This keyword has the following format:
LIST
listdef-name
  • listdef-name
    Specifies a list of objects to process. The list is defined using the LISTDEF statement.
    You can specify the LISTDEF statement in the following locations:
    • Directly in the SYSIN
    • In a data set that you identify with the OPTIONS LISTDEFDD statement
    A LISTDEF statement in the SYSIN overrides a LISTDEF statement for the same list in the LISTDEFDD data set. When the utility resolves lists from the SYSIN, it parses all SYSIN LISTDEF statements. If a duplicate list name is detected, processing stops. When the utility resolves lists from a LISTDEFDD data set, it parses only the first occurrence of the required
    listdef-name
    . The utility does not analyze the entire data set for duplicate names. For more information about the LISTDEF statement, see the IBM
    Db2 Utility Guide and Reference
    .
Consider the following items when using this keyword:
  • You can specify LIST only once in each RECOVER and REBUILD statement.
  • When you specify LIST, the following keywords are not permitted. If you specify these keywords, an error message is issued and the job is terminated:
    • BY-PART
    • DSNUM
    • FULLDD
    • FULLDSN
    • INDEX
    • OBIDXLAT
    • OBJ-LIST
    • PART
    • TOCOPY
    • TODDN
    • TOVOLUME
Example: Use LIST to Recover Tablespaces and Rebuild Indexes
This example uses LISTDEF statements in the SYSIN to define two lists. One list (TESTLIST) recovers the tablespaces. The other list (TESTLST2) rebuilds the indexes.
LISTDEF TESTLIST INCLUDE TABLESPACE TESTDB.TESTSEG1 INCLUDE TABLESPACE TESTDB.PRTEST2A LISTDEF TESTLST2 INCLUDE INDEX TEST04.TSINDXA* INCLUDE INDEX TEST04.PRINDXB* INCLUDE INDEX TEST04.PRINDXC* INCLUDE INDEX TEST04.PRINDX2* RECOVER LIST TESTLIST SORTLOG YES REBUILD INDEX LIST TESTLST2