What is the Conditional Reorganization Support Service?

The Conditional Reorganization Support Service (CRSS) provides database administrators the ability to automate the decision-making tasks that are involved in database reorganization. It evaluates the database and determines whether reorganization is needed for the database.

The CRSS uses a reorganization policy to evaluate a database and to determine if it needs to be reorganized. A reorganization policy contains criteria for evaluating database statistics and can be customized to set specific criteria. The policies can be customized and managed through the ISPF user interface that is provided by Policy Services.

The CRSS is supported for the Smart Reorg utility and IMS Database Solution Pack: IMS Online Reorganization Facility (also referred to as IMS Online Reorganization Facility).

When a Smart Reorg job or IMS Online Reorganization Facility job is run in Conditional Reorganization mode, the job goes through the following phases:

  1. First evaluation phase

    In the first evaluation phase, the CRSS collects the statistics data from the target database and evaluates the statistics data by using the criteria that is defined in the reorganization policy to detect database exceptions. Based on the exceptions that are detected, the policy determines whether the database needs to be reorganized. Then, the CRSS returns the result to the Smart Reorg Driver or IMS Online Reorganization Facility.

  2. Reorganization phase
    • When the Smart Reorg Driver receives recommendation to reorganize the database or some HALDB partitions from the CRSS, it invokes the Parallel Reorganization Service, and the reorganization process is run. During the reorganization reload process, some statistics of the reloaded shadow data sets are collected by the CRSS.
    • When IMS Online Reorganization Facility receives recommendation to reorganize the database from the CRSS, it starts the reorganization process.
  3. Second evaluation phase
    When the reorganization process ends and the database reorganization is committed, the CRSS collects some additional statistics data about the reorganized database, and commits all statistics data that it collected during the reload process and after reorganization. Then, the CRSS evaluates the data by using the same policy that was used in the first evaluation phase to detect any remaining database exceptions.
    • For the Smart Reorg utility, if automatic post-reorganization processing is not requested, the CRSS collects the database statistics from the shadow data sets.
    • For IMS Online Reorganization Facility, after the reorganized database is started in the takeover phase, the CRSS collects the database statistics from the reorganized database.
  4. Reporting phase

    The CRSS generates a Diagnosis report that shows the detected database exceptions, database statistics from before and after reorganization, and a summary of the job, and stores the report in a central repository that is managed by IMS Tools KB. When reorganization is not processed (that is, in the first evaluation phase when the policy determined that the database did not need to be reorganized) the CRSS generates a Diagnosis report that summarizes the detected database exceptions (if any) and the statistics of the database.

    In this phase, notification messages about the result of the policy evaluation can optionally be sent to designated TSO users and designated z/OSĀ® consoles.

When a Smart Reorg job is run in Conditional Reorganization mode, optionally the Smart Reorg job can create an unload data set without reorganizing the database. When this happens, a specific return code is passed to the succeeding job step to run the database reorganization in the succeeding job step.

When a Smart Reorg job is run in Diagnosis-only mode, the job goes through only the first evaluation phase and the reporting phase.

When a Smart Reorg job is run in Conditional Reorganization mode or in Reorganization Diagnosis mode and internal errors occur in CRSS processing, the Smart Reorg Driver invokes the Parallel Reorganization Service to reorganize the database without considering the evaluation result that is returned from the CRSS. This mechanism prevents the possibility that a required reorganization is accidentally skipped because of an internal error in the CRSS. When a Smart Reorg job is run in Diagnosis-only mode and internal errors occur in CRSS processing, the Smart Reorg Driver ends the job and issues error messages.