Space announcement

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

UNLOAD phase

During the UNLOAD phase, REORG PLUS prepares data to allow concurrent processing for reloading table spaces and indexes. The UNLOAD phase prepares the unloaded rows for reloading into the specified tables by the RELOAD phase.

Depending on the data and the characteristics of the tables, REORG PLUS performs one or more of the following tasks during the UNLOAD phase:

  • Reads the rows from the Db2 tables or indexes

  • Sorts the rows (except in the instances noted in SORTWK data sets in REORG PLUS)

  • Writes the row images to the SYSREC data sets

  • Writes the index work records to the SYSUT1 data sets

  • Writes discarded rows from SELECT or DELETE processing to the SYSARC data set (if specified)

  • Builds or keeps the compression dictionary and compresses the rows

For additional information about the UNLOAD phase for a SHRLEVEL CHANGE reorganization, see UNLOAD phase.

Resource allocation in the UNLOAD phase

REORG PLUS checks the amount of available virtual storage within the region and the number of processors in the CPU to determine how much data can be unloaded concurrently. If you specify a nonzero value for SMAX or MAXSORTS, REORG PLUS uses the lowest of the following values to determine the maximum number of tasks that can run concurrently:

  • 16

  • SMAX value specified in the installation options

  • MAXSORTS value specified in the REORG command statement

  • Number of processors

If you specify 0 for SMAX and MAXSORTS, REORG PLUS uses the lower of the following values to determine the maximum number of tasks that can run concurrently:

  • 16

  • Value of the multitasking options RORGMAX, UNLDMAX, or BILDMAX

In addition to using the various command and installation options, REORG PLUS considers the following factors when calculating the maximum number of tasks that can run concurrently:

  • Number of partitions in the table space and index space

  • Number of sort work data sets divided by two

After determining the maximum number of tasks, REORG PLUS calculates the number of sort work files per task by dividing the number of sort work files specified in the JCL by the number of tasks. REORG PLUS then calculates the amount of sort work space per task by multiplying the number of sort work files per task by the size of the sort work files.

The following figures display the objects that REORG PLUS might use in the UNLOAD phase.


UNLOAD phase for a table space reorganization


UNLOAD phase for an index reorganization

If the sort work space per task is sufficient to sort the largest partition, unload processing continues. If insufficient space is available to sort the largest partition, REORG PLUS reduces the number of tasks by one and recalculates the sort work space per task. The recalculations continue until either enough sort work space is available to sort the largest partition in a single task, or the number of tasks is reduced to less than one. When the number of tasks is reduced to less than one, REORG PLUS processing terminates with message BMC50399E, indicating constrained resources.

After REORG PLUS determines the number of sort tasks and amount of space, unload processing begins. REORG PLUS assigns partitions to each task as the task starts. The number of partitions unloaded per task varies with the size of the partition and the amount of sort work space available per task. The unload process determines the optimal number of partitions for each task as the task starts.

This balancing of tasks optimizes the reorganization process when the resources are available and allows nonoptimized processing to continue when only minimal resources are available.

Related topic

Was this page helpful? Yes No Submitting... Thank you

Comments