DSNUM—Specify the Partitions to Recover

The DSNUM keyword specifies the partitions or data set to recover.
cafrdb219
Use the DSNUM keyword to specify which partitions or data set to recover. The DSNUM keyword is the same as the PART keyword.
If you use wildcards to select objects for processing, the objects are always recovered by partitions.
This keyword has the following format:
DSNUM {
ALL
|int}
  • ALL
    Recovers or rebuilds all partitions in the tablespace as a whole. This value is the default.
    DSNUM ALL is invalid when you are recovering a partitioned tablespace that was copied with one copy per partition. In that case, recover each partition separately. If ALLPARTS YES is specified in the PFR parmlib member, DSNUM ALL is ignored. The partitions are processed individually.
  • int
    Specifies the partition or data set to recover or the partition of an index to rebuild. To identify a data set, use the integer at the end of the data set name as it is cataloged in the VSAM catalog.
    To apply the same DSNUM
    int
    value to all indexes inside parentheses, specify DSNUM
    int
    outside the parentheses. If you specify DSNUM
    int
    for any indexes inside parentheses, do not specify this keyword at the end of the statement.
    If DSNUM
    int
    is specified, the ALLPARTS YES setting in the parmlib member is ignored. Only the specified partitions are processed.
You cannot specify individual partitions for recovery (DSNUM
int
or PART) in the following situations:
  • The objects are nonpartitioned.
  • RECOVER DATABASE, RECOVER INDEX(ALL) TABLESPACE, OBJ-LIST, or LIST is specified.
  • Wildcards are used in the tablespace specification (for example, RECOVER TABLESPACE
    dbname
    .
    tsname
    %).
  • Nonpartitioning indexes (NPI) are specified. The rebuild of logical partitions is not supported for NPIs. Verify that NPIs are not specified (by name, included in INDEX(ALL), or by wildcards) with REBUILD INDEX DSNUM or PART.
Example: Recover the Specified Partitions
This example recovers partitions 1, 3, and 5 of tablespace DB1.DB1TS1:
RECOVER TABLESPACE DB1.DB1TS1 DSNUM 1 TABLESPACE DB1.DB1TS1 DSNUM 3 TABLESPACE DB1.DB1TS1 DSNUM 5
Example: Rebuild the Specified Partitions of Indexes
The following examples rebuild the specified partitions of indexes.
  • This example rebuilds partition 1 of indexes
    ixname1
    ,
    ixname2
    , and
    ixname3
    :
    REBUILD (
    ixname1
    ,
    ixname2
    ,
    ixname3
    ) TABLESPACE DB01.TS01 DSNUM 1
  • This example rebuilds the partition 1 of
    ixname1
    , partition 2 of
    ixname2
    , and the entire index
    ixname3
    :
    REBUILD (
    ixname1
    DSNUM 1,
    ixname2
    DSNUM 2,
    ixname3
    )
Example: Recover All Partitions as a Whole
This example recovers all partitions of the tablespace DB1.DB1TS1 as a whole. The example assumes that ALLPARTS NO is specified in the PFR parmlib member:
RECOVER TABLESPACE DB1.DB1TS1 DSNUM ALL