Adding or changing a HALDB partition selection exit routine

If your installation uses a HALDB partition selection exit routine, you might need to modify the exit routine to adjust the distribution of records across the partitions in your HALDB database.

Typically, you do this when the amount of data in each partition is not balanced across all of the partitions in the HALDB database. You can change the distribution of records by switching exit routines or modifying the existing exit routine while the entire HALDB database is offline.

To add or change a HALDB partition selection exit routine:

Procedure

  1. Take the entire HALDB database offline by issuing either the type-1 command /DBRECOVERY DB or the type-2 command UPDATE DB NAME(dbname) STOP(ACCESS).
  2. Unload all of the partitions that will be affected by the new or changed partition selection exit routine.
  3. Change the partition definitions, such as the partition strings or randomizing parameters, as necessary. Changing the definition of a partition sets the PINIT flag for the partition, which might save you time in the next step.
  4. Set or unset the PINIT flags of each partition as necessary by using either the HALDB Partition Definition utility (%DFSHALDB) or the batch DBRC command CHANGE.DB:
    • If you are adding a new partition selection exit routine and are, therefore, introducing a new distribution of records across all partitions, you do not need to change any of the PINIT flags. The PINIT flag is correctly set in all of the partitions.
    • If you are changing only the name of an existing partition selection exit routine and the distribution of records across all partitions remains the same, turn off the PINIT flags in all partitions. Even though only the name of the exit routine has changed, IMS views the exit routine as a new partition selection exit routine and, therefore, sets the PINIT flag of all partitions.
    • If you are changing the name of an existing partition selection exit routine and you have also changed how the partition selection exit routine distributes records across partitions, turn off the PINIT flags in any partitions that are not affected by the change in the distribution of records.
    • If you are changing only the way an existing partition selection exit routine distributes records across partitions, but you have not changed the name of the partition selection exit routine, you must set the PINIT flag in all partitions that are affected by the change in the distribution of records.
  5. Initialize the partitions that are affected by any changes in the distribution of records.
  6. Reload the partitions affected by any changes in the distribution of records using HD Reorganization Reload utility (DFSURGL0).
  7. Take an image copy of the reloaded partitions. The image copy needed flag is set for the data sets in the partitions that are initialized or loaded by the DFSURGL0 utility.
  8. Restore access to the HALDB database by issuing either the type-1 command /START DB or the type-2 command UPDATE DB NAME(dbname) START(ACCESS).

For more information:

  • About the sample HALDB Partition Selection exit routine (DFSPSE00), see IMS Version 15.3 Exit Routines.
  • About the HD Reorganization Reload utility, see IMS Version 15.3 Database Utilities.