SYSARC data sets in REORG PLUS
- For native REORG PLUS jobs, SYSARC is an archive data set that contains discarded rows. REORG PLUS discards these rows when performing one of the following processes during a table space reorganization:
- A SELECT or DELETE operation
- Materialization of a pending definition change that alters the limit key of the last partition
- Rebalance of a table space where the last partition key has been altered and the table space is defined in one of the following ways:
- LARGE (either by definition or default)
- Defined with DSSIZE
- Range-partitioned
- For DSNUTILB reorganization jobs, REORG PLUS passes the dynamic allocation information for this data set to the IBM Db2 REORG utility to allocate the data set that contains discarded rows.
Native REORG PLUS jobs
The following considerations and allocation information apply to non-DSNUTILB reorganization jobs.
Considerations
Note the following general information about SYSARC data sets:
- The archive data set is required when either of the following conditions exist:
- A pending definition change exists that alters the limit key of the last partition.
- All of the following conditions exist:
- REORG PLUS performs partition rebalancing as part of the reorganization
- The last partition is in REORP status either going into the reorganization or changed to REORP status during the reorganization.
- The table space is LARGE or was defined with DSSIZE specified, or uses table-controlled partitioning.
- The archive data set is optional if you are using a SELECT or DELETE statement. If you do not specify the archive data set, any discarded rows are lost.
- REORG PLUS writes to the archive data set during unload processing.
You can specify the ARCHFORMAT option to tell REORG PLUS whether you want to write the discarded rows to this data set in an internal format (ARCHFORMAT BMC) or in a format that both LOADPLUS and the Db2 LOAD utility can read (ARCHFORMAT DB2).
For ARCHFORMAT Db2, the format of the discarded rows is the same as that produced by the Db2 REORG utility when you specify UNLOAD ONLY. This format differs from the format of the discard records that the Db2 REORG utility produces.
You can reload the discarded rows in the SYSARC data set by using one of the following options:
- The FORMAT BMC option of any currently supported version of LOADPLUS (if ARCHFORMAT is BMC)
- The FORMAT UNLOAD option of LOADPLUS or the Db2 LOAD utility (if ARCHFORMAT is Db2)
The table that you are loading must have the same definition as the table from which the archive rows originated. For more information about using LOADPLUS to load these rows, see the LOADPLUS for DB2 documentation.
Dynamically allocating SYSARC data sets
When dynamic allocation is active, REORG PLUS allocates the SYSARC data set only when performing the following processes:
- Processing a SELECT or DELETE statement
- Materializing a pending definition change that alters the limit key of the last partition
- Rebalancing the last partition of a table space that is LARGE or was defined with DSSIZE specified, or uses table-controlled partitioning
REORG PLUS uses information from the ANALYZE phase to analyze the requirements for the current execution and calculates the optimal file size and number of files to allocate.
Note the following additional information about dynamically allocating SYSARC data sets:
- You can use the ARCROWS command option to control the size of a dynamically allocated archive data set.
- You can decide when to delete the dynamically allocated archive (SYSARC) data set by specifying an expiration date with the EXPDT option or by specifying a retention period with the RETPD option.
Allocating SYSARC data sets in your JCL
The following restrictions apply to the SYSARC data set:
- To accommodate restarting REORG PLUS any time after the UNLOAD phase for a two-phase reorganization, the SYSARC should not be a temporary data set. For information about how REORG PLUS treats temporary data sets, see Work-file-validity-and-integrity-checks.
- We recommend that you do not use either of the following DD specifications for the SYSARC data set:
- DD DUMMY
- DSN=NULLFILE
- Do not use the same SYSARC data set for two different jobs. If you specify DISP=MOD for an existing SYSARC data set, REORG PLUS treats it as if you had specified DISP=OLD. Therefore, you will lose the data that already exists in the data set.
If you restart a job using the same SYSARC data set (DISP=MOD) as you used for the initial run, and the data set had an expiration date or retention period, respond U to the following message to continue processing:
IEC507D REPLY 'U'-USE OR 'M'-UNLOAD
DSNUTILB reorganization jobs
When invoking DSNUTILB, REORG PLUS includes the dynamic allocation information for the optional SYSARC data set in the TEMPLATE control statement that REORG PLUS builds for the discard data set for the IBM Db2 REORG utility. This data set contains the rows that are discarded during the reorganization.
Db2 REORG requires the discard data set when certain conditions exist. If you do not enable dynamic allocation for this data set and Db2 REORG needs the data set, the reorganization terminates. For information about this data set, including requirements, see the DISCARD and SYSDISC information in the documentation for the Db2 REORG utility.
Allocation
To allocate this data set, you must enable dynamic allocation for the ARCHIVE DDTYPE. If you include an SYSARC DD statement in your JCL for a DSNUTILB reorganization, REORG PLUS ignores it.
Considerations
The following considerations apply to the SYSARC data set for DSNUTILB reorganization jobs:
- When invoking DSNUTILB to reorganize a LOB table space, REORG PLUS does not allocate this data set.
- The ARCROWS option is available for the SYSARC data set when you run a native REORG PLUS job but is not available for a DSNUTILB job.
- You can decide when to delete this data set by specifying an expiration date with the EXPDT option, or by specifying a retention period with the RETPD option.