Syntax and options of the MODIFY RECOVERY control statement
The MODIFY RECOVERY utility control statement, with its multiple options, defines the function that the utility job performs.
You can create a control statement with the ISPF/PDF edit function. After creating it, save it in a sequential or partitioned data set. When you create the JCL for running the job, use the SYSIN DD statement to specify the name of the data set that contains the utility control statement.
Syntax diagram
>>-MODIFY--RECOVERY---------------------------------------------> >--+-LIST--listdef-name------------------------------+----------> '-TABLESPACE--+----------------+-table-space-name-' '-database-name.-' .-DSNUM--ALL-----. >--+----------------+--+-------+--------------------------------> '-DSNUM--integer-' '-CLONE-' >--+-DELETE-+------------------+----------------------+-------->< | +-AGE-+-integer-+--+ | | | '-(*)-----' | | | '-DATE-+-integer-+-' | | '-(*)-----' | '-RETAIN----+-LAST--(--integer--)--------------+---' +-LOGLIMIT-------------------------+ '-GDGLIMIT-+---------------------+-' +-LAST--(--integer--)-+ '-LOGLIMIT------------'
Option descriptions
- LIST listdef-name
- Specifies the name of a previously defined LISTDEF list name that contains only table spaces.
You can specify one LIST keyword per MODIFY RECOVERY control statement. Do not specify LIST with the
TABLESPACE keyword. MODIFY is invoked once for each table space in the list. This utility will only
process clone data if the CLONE keyword is specified. The use of CLONED YES on the LISTDEF statement
is not sufficient.
The partitions or partition ranges can be specified in a list.
- TABLESPACE database-name.table-space-name
- Specifies the database and the table space for which records are to be deleted.
- database-name
- Specifies the name of the database to which the table space belongs.
database-name is optional.
The default value is DSNDB04.
- table-space-name
- Specifies the name of the table space.
- DSNUM integer
- Identifies a single partition or data set of the table space for which records are to be
deleted; ALL deletes records for the entire data set and table space.
integer is the number of a partition or data set.
The default value is ALL.
For a partitioned table space, integer is its physical partition number. The maximum is 4096.
For a nonpartitioned table space, use the data set integer at the end of the data set name as cataloged in the VSAM catalog. If image copies are taken by partition or data set and you specify DSNUM ALL, the table space is placed in COPY-pending status if a full image copy of the entire table space does not exist. The data set name has the following format, where y is either I or J, z is either a 1 or 2, and nnn is the data set integer.catname.DSNDBx.dbname.tsname.y000z.Annn
If you specify DSNUM n, MODIFY RECOVERY does not delete any SYSCOPY records for the partitions that have an RBA greater than that of the earliest point to which the entire table space could be recovered. That point might indicate a full image copy, a LOAD operation with LOG YES or a REORG operation with LOG YES.
If you specify DSNUM n for a partitioned table space, MODIFY RECOVERY deletes SYSCOPY records for all partitioned index spaces as well as for the partition and updates the version numbers in the SYSIBM.SYSINDEXES catalog table. However, DB2® does not perform these functions for the nonpartitioned indexes.
If DSNUM ALL is implicitly or explicitly specified for a table space that has a partition in PRO restricted status, MODIFY RECOVERY fails. If the partition that you specify is in PRO restricted status, the RETAIN value is set to LAST(2).
- CLONE
- Indicates that MODIFY RECOVERY is to delete SYSCOPY records and SYSLGRNX records for only clone objects. If CLONE is not specified, only records for the base objects are deleted. This utility will only process clone data if the CLONE keyword is specified. The use of CLONED YES on the LISTDEF statement is not sufficient.
- DELETE
- Indicates that records are to be deleted.
See
the DSNUM description for restrictions on deleting partition statistics.
- AGE integer
- Deletes all SYSCOPY and SYSLGRNX records that are older than a specified number of
days. SYSLGRNX records that meet the age deletion criteria specified will be deleted even if no
SYSCOPY records are deleted.
integer is the number of days, and can range from 0 to 32767. Records that are created today are of age 0 and cannot be deleted by this option.
(*) deletes all records, regardless of their age.
- DATE integer
- Deletes all SYSCOPY and SYSLGRNX records that are written before a specified date.
SYSLGRNX records that meet the date deletion criteria specified will be deleted even if no SYSCOPY
records are deleted.
integer can be in eight- or six-character format. You must specify a year (yyyy or yy), month (mm), and day (dd) in the form yyyymmdd or yymmdd. DB2 checks the system clock and converts six-character dates to the most recent, previous eight-character equivalent.
(*) deletes all records, regardless of the date on which they were written.
- RETAIN
- Indicates that records are to be retained. Older records are
deleted.
To determine a cleanup date, RETAIN checks only records in SYSIBM.SYSCOPY with ICTYPE=F (full copy), ICBACKUP=blank (LOCALSITE primary copy), and DSNUM as stated for the specified table space.
RETAIN works internally with a date, not a complete timestamp. As a result, more copies might be kept than are specified by RETAIN. For example, if the most recent five copies have been taken on the same day, and RETAIN LAST (2) is specified, then all five copies remain in SYSCOPY.
- LAST (integer)
- Specifies the number of recent records to retain in SYSIBM.SYSCOPY.
- LOGLIMIT
- Queries the BSDS to determine the oldest archive log timestamp and deletes records older than this timestamp. For data sharing, DB2 queries the BSDS of all data sharing members to determine the overall oldest log timestamp. If the BSDS is not available for one of the members and the corresponding member is quiesced, this BSDS is ignored.
- GDGLIMIT
- Retrieves
the limit value for the generation data group (GDG) if the most recent record in SYSIBM.SYSCOPY
refers to a generation data set (GDS). DB2 retains as many
records that reference the same GDG as it can without exceeding this GDG limit value. In this
situation, DB2 does not consider other GDGs that are
referenced by SYSIBM.SYSCOPY records. These records that reference other GDGs are deleted in
accordance with the deletion date.
- LAST (integer)
- Specifies the number of recent records to retain in SYSIBM.SYSCOPY if the most recent record in SYSIBM.SYSCOPY refers to a non-GDS.
- LOGLIMIT
- Queries the BSDS to determine the oldest archive log timestamp if the most recent record in SYSIBM.SYSCOPY refers to a non-GDS. For data sharing, DB2 queries the BSDS of all data sharing members to determine the overall oldest log timestamp, and deletes records older than this timestamp. If the BSDS is not available for one of the members and the corresponding member is quiesced, this BSDS is ignored.