Copy data sets in REORG PLUS
REORG PLUS creates one or more output copy data sets when you specify COPY YES.
These output data sets contain a DSN1COPY-type copy or image copy of a nonpartitioned table space, all partitions of a partitioned table space, or selected partitions of a partitioned table space.
For a two-phase reorganization, REORG PLUS makes the copies during the RELOAD phase. For a single-phase reorganization, REORG PLUS makes the copies during the REORG phase. REORG PLUS creates all copies with system pages at the beginning of the data set (in the same way that the IBM Db2 COPY utility creates image copies when you specify SYSTEMPAGES YES).
The copy ddnames identify the output data sets that will contain the copy (after the reorganization) either of the table space, of each partition in the table space, or of the specified subset of partitions. The number of copies that REORG PLUS makes when you specify COPY YES depends on the following information:
- (with dynamic allocation) The DDTYPE and COPYLVL specifications in your installation and command options
- (without dynamic allocation) The existence of the copy ddnames in your JCL
REORG PLUS provides the following default names for each type of copy data set. This book uses the default name to refer to that type of copy data set.
Default name | Function |
---|---|
BCPYnn | Local primary |
BCPZnn | Local backup |
BRCYnn | Remote primary |
BRCZnn | Remote backup |
BICYnn | Local primary incremental |
BICZnn | Local backup incremental |
BRCYnn | Remote primary incremental |
BRCZnn | Remote backup incremental |
When you are reorganizing either all partitions or a single subset of contiguous partitions of a partitioned table space, you can use the COPYLVL option to specify how REORG PLUS assigns the dynamically allocated full and incremental copy data sets.
Requirements
REORG PLUS requires the following copy data sets when you specify COPY YES:
- For all reorganization jobs, BCPY is required when you specify COPY YES.
- For all reorganization jobs, if you specify BRCZ, BRCY is also required.
- For a SHRLEVEL CHANGE reorganization, REORG PLUS might require a matching incremental copy data set for each copy data set defined. For more information, see Incremental-copy-data-sets-for-SHRLEVEL-CHANGE.
When invoking DSNUTILB, REORG PLUS requires that you dynamically allocate your copy data sets.
Overriding the default ddnames
To override the default copy ddnames or ddname prefixes that are specified in your installation options module, see the information in REORG-PLUS-DD-statements.
Registration
The ddname itself controls the registration information that is placed in the ICBACKUP column of SYSIBM.SYSCOPY when you specify either ALL (the default) or specific ddnames for the REGISTER option.
Methods for allocating copy data sets
You can use one of the methods described in Methods-for-allocating-copy-and-work-data-sets to allocate your copy data sets.
REORG PLUS determines the optimal block size of the copy data sets based on the device type that contains the data set. Copy data sets can be on different device types. However, if additional copy data sets (for example, remote backup copy data sets) for the same object are on different device types, the block size for all copy data sets for that object is the block size that REORG PLUS determined was optimal for the primary local copy.
Dynamically allocating copy data sets
Based on the information in Table 2, specify dynamic allocation options that result in the same number and type of copy data sets as if you specified DD statements in your JCL.
Restriction
REORG PLUS does not allow dynamically allocated copy data sets to be stacked on tape.
Additional considerations
Note the following additional considerations:
- For full and incremental copy data sets, REORG PLUS determines the size of the dynamically allocated files based on the high-used RBA of the table space that you are reorganizing.
- When dynamically allocating copy data sets for partition-by-growth table spaces, REORG PLUS uses the DSSIZE value to estimate the size. For more information about copy data sets for partition-by-growth table spaces, see Partition-by-growth table spaces.
- If you specify DELETEFILES YES and the job terminates after a failure, REORG PLUS deletes any unregistered full and incremental copy data sets.
- You can decide when to delete the dynamically allocated copy data sets by specifying an expiration date with the EXPDT option or by specifying a retention period with the RETPD option.
- For information about partition-level copies, see Partition-level copieson page 357 and Partition-by-growth table spaces.
For more information about dynamic allocation, see Allocating-dynamic-data-sets.
Allocating copy data sets in your JCL
If you do not use dynamic allocation, you must allocate the copy data sets in your JCL by specifying DD statements as described in the following table. Do not specify separate data sets for nonpartitioned, multi-data-set table spaces.
Table space being copied | Type of reorganization | Copy DD statements required |
---|---|---|
Nonpartitioned | Any | Specify one DD statement for each copy type that you want REORG PLUS to make. Do not use nn in the ddname. |
Partitioned, including partition-by-growth | Full (entire table space) | Make one of the following specifications:
|
Partial (selected partitions using PART option) | Make one of the following specifications:
|
1 The value of the COPYSUBSET installation option must be YES.
The size that REORG PLUS needs for the copy data sets depends on the number of pages required when the table space is reorganized. REORG PLUS calculates the number of required pages and issues message BMC51286I, which includes the number of pages. If you specify UNLOAD PAUSE, you can use information from the ANALYZE phase to allocate the primary amount as the total amount. No secondary amount is needed.
Use the following table to determine the value to use for your data set allocation.
Table space type | Number of copy data sets | Calculation |
---|---|---|
Nonpartitioned | Not applicable | Multiply the number of pages required for reorganizing by the page size of the table space. |
Partitioned | Single | Multiply the total number of pages for all reorganized partitions by the page size of the table space. |
Multiple | For each data set, multiply the number of pages for that partition by the page size of the table space. |
Restrictions
Note the following restrictions when allocating copy data sets in your JCL:
- REORG PLUS does not support updating SMS-managed striped data sets for copy data sets if you specify the following options:
- ICTYPE=AUTO (command or installation option)
- ICTYPE=UPDATE (command or installation option)
- INLINE NO (command option)
- INLINECP=NO (installation option)
- Copy data sets cannot be temporary data sets. For information about how REORG PLUS defines a temporary data set, see Work-file-validity-and-integrity-checks.
- BMC recommends that you do not specify DISP=MOD for an image copy data set because REORG PLUS does not reset the data set to empty but appends data to any data already present in the file.
Partition-level copies
Note the following additional information when allocating partition-level copies.
Naming partition-level copies
Use the nn as part of the ddname only if you are reorganizing a partitioned table space and you want a separate data set for each partition.
JCL rules limit ddnames to eight characters. If you are making partition-level copies, the ddname has two parts: the ddname prefix (minimum of one character) and the partition number nn (one to seven characters). The ddname that you specify in the installation options or the command options becomes the ddname prefix.
Note the following information about the partition number:
- If you are dynamically allocating copy or incremental copy data sets (and you specify COPYLVL PART to make partition-level copies), REORG PLUS appends the partition number to the ddname prefix. If you are reorganizing a table space that contains more than 99 partitions, use the copy or incremental copy options to specify a prefix that results in eight characters or less after REORG PLUS appends the highest partition number. For more information, see Specifying ddname prefixes.
- If you are allocating copy data sets in your JCL, you must append the partition number nn to the ddname prefix. The nn must match the partition that you are copying, and you must allow sufficient bytes for REORG PLUS to add the partition number to the prefix and still have a valid ddname (eight characters or less).
Large number of partitions
If you are reorganizing a large number of partitions, consider one of the following options to avoid encountering data set allocation restrictions of the operating system or REORG PLUS memory restrictions:
- Limit the number of copies per partition.
- If your site’s recovery strategy allows for full copies, use one of the following options:
- If you are reorganizing all partitions, dynamically allocate your copy data sets and create a single copy by specifying COPYLVL FULL.
- If you are reorganizing a subset of partitions, create a single copy by specifying the following options:
- A single physically contiguous range of partitions
- COPYSUBSET=YES in the installation options module
- If you are dynamically allocating your copy data sets, COPYLVL FULL on your REORG command
Partition-by-growth table spaces
For partition-by-growth table spaces, REORG PLUS requires the allocation of additional data sets when you are making partition-level copies and either REORG PLUS can extend the table space or you are performing a full SHRLEVEL CHANGE table space reorganization.
For partition-by-growth table spaces, you need copy data sets as described in Table 2, plus additional data sets equal to the smaller of the following values:
- MAXPARTITIONS minus the number of partitions in the table space
- MAXNEWPARTS
Although REORG PLUS requires that the additional data sets be allocated, it only uses them if partitions are added to the table space during the reorganization. REORG PLUS deletes unused data sets after the reorganization.
When dynamically allocating these data sets, REORG PLUS uses the DSSIZE value to allocate the data set for each partition. The following example illustrates the additional data set requirements using copy data sets.
Example
The following example illustrates the additional data set requirements using copy data sets. Assume the following scenario:
- You are performing a partial reorganization of a table space with four partitions.
- The value of MAXPARTITIONS is 6.
- Your SYSIN data set contains the following specifications:
PART 3:LAST
MAXNEWPARTS 3
COPYDDN BMCCPY
In this example, REORG PLUS requires that four copy data sets be defined in the JCL or through dynamic allocation:
- One for each of the two partitions that are participating in the reorganization (partitions 3 and LAST)
Two additional for partitions that might be added
That is, MAXPARTITIONS (6) minus total partitions in the table space (4) which equals 2. This value is smaller than the MAXNEWPARTS value (3).
Improving performance
When reorganizing a partitioned table space, REORG PLUS multitasks the image copy process whenever possible, thus decreasing the elapsed time needed to run the reorganization. To facilitate optimal multitasking, provide a unique full copy data set for each partition that you are reorganizing and ensure that each copy data set resides on DASD. If you are performing a SHRLEVEL CHANGE reorganization, use AUTO for the ICTYPE command or installation option.
If you decide to store your full copy data sets on tape, you will improve performance if you do not stack multiple files on a single tape.
You can improve performance by having REORG PLUS create inline image copies. The difference between inline image copies and standard image copies or DSN1COPY-type copies is that REORG PLUS creates inline copies as it reloads the table space, rather than after it reloads the table space. This can reduce the elapsed time of the reorganization. For details about how to create inline image copies, see Copy-options-for-REORG-TABLESPACE.
Related topic