Reorganization Manager

This topic describes the major functions that Reorganization Manager provides.

Reorganization Manager provides Smart Reorg with full DBRC support. For more information, see Setting up the DBRC command authorization.

Subsections:

Dynamic allocation of database data sets

By default, Reorganization Manager dynamically allocates input database data sets by using DFSMDA members or DBRC registrations. For output shadow database data sets, Reorganization Manager creates the names based on the corresponding original data set names and allocates them dynamically. To disable the function, you can specify the DYNALLOC control statement.

If the SPACEALLOC option is specified, the DASD space for the shadow database is allocated automatically. By default, you need to preallocate the DASD space in the prior IDCAMS step.

For details, see Considerations for database data sets, DYNALLOC control statement, and SPACEALLOC control statement.

Allowing DBD change during reorganization (In Unconditional Reorganization mode)

Some DBD parameters can be changed during the reorganization when the job is run in Unconditional Reorganization mode. For details, see NEWDBD control statement.

Automated IMS command processing

If you specify IMSCMD=YES, Reorganization Manager does the following automatically:

  • At the beginning of the reorganization, Reorganization Manager issues either a /DBD command or a /DBR command depending on the DBSHARE option. The /DBD command places the database in read-only mode for the online system and the /DBR command places the database in the STOPPED, NOT OPEN status. Further authorization for the database is prohibited.
  • During the post-reorganization processing that includes data set name swapping, Reorganization Manager automatically issues a /DBR command.
  • After the post-reorganization processing, Reorganization Manager automatically issues a /STA command to the subsystems that accepted the /DBR command. You must specify both IMSCMD=YES,TOSI and STARTDB=YES.

These commands are issued through the E-MCS console or the IMS Tools Online System Interface for an online IMS subsystem. See IMSCMD control statement and DBSHARE control statement. For details of how to set up E-MCS console or IMS Tools Online System Interface for the Smart Reorg utility, see Setting up for using E-MCS console for IMS command processing.

If you specify AUTHFAIL=WTOR, WTO messages are issued when the preceding commands are necessary to be issued and Reorganization Manager waits for operator responses. For details, see AUTHFAIL control statement.

Automated DBRC authorization and unauthorization processing

If you specify DBRCAUTHCMD=YES, Reorganization Manager does the following automatically:

  • At the beginning of the reorganization, Reorganization Manager issues either a CHANGE.DB READON command or a CHANGE.DB NOAUTH command depending on the DBSHARE option. The CHANGE.DB READON command changes the READ ONLY flag of the database in RECON, and the CHANGE.DB NOAUTH command changes the PROHIBIT AUTHORIZATION flag of the database in RECON. Further authorization for the database is prohibited.
  • During data set name swapping, Reorganization Manager automatically issues a CHANGE.DB NOAUTH command.
  • After the post-reorganization processing ends successfully, Reorganization Manager automatically issues the CHANGE.DB AUTH READOFF command unless LASTAUTHFLAG=ORIGINAL is specified. If you specify LASTAUTHFLAG=ORIGINAL, Reorganization Manager automatically issues the CHANGE.DB command to restore the authorization flags in RECON to the original state. For details, see LASTAUTHFLAG control statement.
  • Before the Smart Reorg job terminates abnormally due to an error, Reorganization Manager automatically issues the CHANGE.DB command to restore the authorization flags in RECON to the original state. For details, see Automated DBRC processing for restoring authorization flags.

See DBRCAUTHCMD control statement and DBSHARE control statement.

If you specify AUTHFAIL=WTOR, WTOR messages are issued when the previously described commands must be issued manually and Reorganization Manager waits for operator responses. For details, see AUTHFAIL control statement.

Note: If the Smart Reorg utility issues the DBRC commands successfully but the database is used by another IMS system, the necessary authorization condition might not be satisfied. If you run a Smart Reorg job while the database is online, it is recommended that you specify IMSCMD=YES rather than DBRCAUTHCMD=YES.

Automated data set name swapping

When the reorganization is completed, the data set names of the old and new data sets must be swapped so that the reorganized data sets of the database or of the HALDB partition can be made available. Reorganization Manager invokes IDCAMS to swap the names. The names of the original (disorganized) database data sets and the shadow (reorganized) data sets are swapped automatically.

You can keep the database online and allow read access to users while the parallel reorganization job is running. The database or the HALDB partition needs to be offline only long enough to swap data set names.

If the reorganization ends before the data set names are swapped, you can abandon the reorganization. This method eliminates the need to take an image copy of the disorganized database before the reorganization and the need for recovery if the reorganization fails.

For details of name swapping, see Considerations for database data sets and NAMESWAP control statement.

Automated DBRC notification processing

If the data set name swapping succeeds, Reorganization Manager issues the DBRC NOTIFY.REORG command for the database or the HALDB partitions to create REORG records. If you request that the secondary index be built during parallel reorganization, the NOTIFY.REORG command is also issued against the secondary indexes.

Reorganization Manager can also issue the DBRC NOTIFY.IC or NOTIFY.UIC commands for the database, HALDB partitions, and indexes. For details, see Image Copy and DBRC and NAMESWAP control statement. See also ICNEEDED control statement.

Automated DBRC processing for restoring authorization flags

When one or more errors are detected in the main task or subtasks, the Smart Reorg utility issues the CHANGE.DB command to restore the READ ONLY flag or the PROHIBIT AUTHORIZATION flag in RECON before ending the reorganization processing abnormally.

The Smart Reorg utility issues the CHANGE.DB command when all the following conditions are met:

  • IMSCMD=YES or DBRCAUTHCMD=YES is specified.
  • The Smart Reorg utility issues the IMS command or the DBRC command at the beginning of the reorganization.
  • The Smart Reorg utility detects one or more errors in the main task or subtasks before the completion of data set name swapping. Specify NAMESWAPFAIL=BACKOUT so that DBRC flags are automatically restored at times of error.