Syntax and options of the CHECK LOB control statement
The CHECK LOB 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
Option descriptions
- LOB
- Indicates that you are checking a LOB table space for defects.
- TABLESPACE database-name.lob-table-space-name
- Specifies the table
space to which the data belongs.
database-name is the name of the database and is optional.
The default value is DSNDB04.
lob-table-space-name is the name of the LOB table space.
- SHRLEVEL
- Indicates the type of
access that is to be allowed for the index, table space, or partition that is to be checked during
CHECK LOB processing.
- REFERENCE
- Specifies that applications can read from but cannot write to the index, table space, or partition that is to be checked.
- CHANGE
- Specifies that applications can read from and write to the index, table space, or partition that
is to be checked.
If you specify SHRLEVEL CHANGE, Db2 performs the following actions:
- Drains all writers and forces the buffers to disk for the specified object and all of its indexes
- Invokes DFSMSdss to copy the specified object and all of its indexes to shadow data sets
- Enables read-write access for the specified object and all of its indexes
- Runs CHECK INDEX on the shadow data sets
By default, DFSMSdss uses FlashCopy® to copy Db2 objects to shadow data sets, if FlashCopy is available. If DFSMSdss cannot use FlashCopy, DFSMSdss uses a slower method. As a result, creating copies of objects might take a long time, and the time during which the data and indexes have read-only access might increase. You can set the CHECK_FASTREPLICATION subsystem parameter to REQUIRED to force the CHECK utility to use only FlashCopy. If FlashCopy is not available, the CHECK utility fails.
Related information:
- DRAIN_WAIT
- Specifies the number
of seconds that CHECK LOB is to wait when draining the table space or index. The specified time is
the aggregate time for objects that are to be checked. This value overrides the values that are
specified by the IRLMRWT and UTIMOUT subsystem parameters.
integer can be any integer from 0 to 1800. If you do not specify DRAIN_WAIT or specify a value of 0, CHECK LOB uses the value of the lock timeout subsystem parameter IRLMRWT.
- RETRY integer
- Specifies the maximum
number of retries that CHECK LOB is to attempt.
integer can be any integer from 0 to 255. If you do not specify RETRY, CHECK LOB uses the value of the utility multiplier system parameter UTIMOUT.
Specifying RETRY can increase processing costs and result in multiple or extended periods during which the specified index, table space, or partition is in read-only access.
- RETRY_DELAY integer
- Specifies the
minimum duration, in seconds, between retries. integer can be any integer
from 1 to 1800.
If you do not specify RETRY_DELAY, CHECK LOB uses the smaller of the following two values:
- DRAIN_WAIT value × RETRY value
- DRAIN_WAIT value × 10
- EXCEPTIONS integer
- Specifies the maximum number of exceptions, which are reported by
messages only. CHECK LOB terminates in the CHECKLOB phase when it reaches the specified number of
exceptions.
All defects that are reported by messages are applied to the exception count.
integer is the maximum number of exceptions.
The default value is 0, which indicates no limit on the number of exceptions.
- PUNCHDDN ddname
- Specifies the DD
statement for a data set that is to receive the REPAIR utility control statements that CHECK LOB
SHRLEVEL CHANGE generates. The REPAIR statements generated deletes the LOBs reported in error
messages from the LOB table space. CHECK DATA should then be run against the base table space to set
the deleted LOB columns in the base records to invalid.
ddname is the DD name.
The default value is SYSPUNCH.
The PUNCHDDN keyword specifies either a DD name or a TEMPLATE name specification from a previous TEMPLATE control statement. If utility processing detects that the specified name is both a name in the current job step and a TEMPLATE name, the utility uses the DD name.
- SORTDEVT device-type
- Specifies the device
type for temporary data sets that are to be dynamically allocated by the sort program.
A TEMPLATE specification does not dynamically allocate sort work data sets. The SORTDEVT keyword controls dynamic allocation of these data sets.
device-type is the device type and can be any disk device type that is acceptable to the DYNALLOC parameter of the SORT or OPTION control statement for the sort program. Tape devices are not supported by the sort program.
If you omit SORTDEVT and a sort is required, you must provide the DD statements that the sort program requires for the temporary data sets.
- SORTNUM integer
- Indicates the number of
temporary data sets that are to be dynamically allocated by the sort program.
integer is the number of temporary data sets that can range from 2 to 255.
If you omit SORTDEVT, SORTNUM is ignored. If you use SORTDEVT and omit SORTNUM, no value is passed to the sort program, which then uses its own default. You need at least two sort work data sets for each sort.
Important: The SORTNUM keyword is ignored if the IGNSORTN subsystem parameter is set to YES. - CLONE
- Indicates that CHECK LOB is to check the LOB space data for only the clone table, not the LOB data for the base table.