Adding a partition to a HALDB database that uses a partition selection exit routine

When you add a partition to a HALDB database that uses a partition selection exit routine, you must manually set the PINIT flag in any partition from which records will be moved to the new partition.

You might also need to modify the exit routine to recognize the new partition, as well as change the partition selection criteria used by the exit routine.

When you use a partition selection exit routine, IMS cannot know which existing partitions are affected by the addition of the partition. Consequently, IMS does not set the PINIT flag for existing partitions that are affected by the redistribution of records to the new partition. You must set the PINIT flag for the existing partitions.

You should also be sure that any partition selection exit routine that you use contains code that processes the structure initialization and structure modification calls that IMS issues when it updates online partition structures after partitions are added or modified. The sample Partition Selection exit routine (DFSPSE00) delivered with IMS includes code that supports these calls.

To add a new partition to a HALDB database that uses a partition selection exit routine:

Procedure

  1. Stop access to the database as appropriate:
    • If you need to modify the partition selection exit routine, stop access to the HALDB master database by issuing either the /DBRECOVERY DB HALDB_master_name command or the UPDATE DB NAME(HALDB_master_name) STOP(ACCESS) command. Stopping access to the HALDB master unloads the existing partition selection exit routine from storage.
    • If you do not need to modify the partition selection exit routine, stop access only to those partitions from which records will be moved to the new partition by issuing either the /DBRECOVERY DB partition_name command or the UPDATE DB NAME(partition_name) STOP(ACCESS) command.
  2. If necessary, modify the partition selection exit routine to use the new partition. The exit routine should be able to process the
  3. Unload the partition or partitions from which records will be moved.
  4. Define the new partition. IMS sets the PINIT flag for the new partition.
  5. Set the PINIT flag in the appropriate existing partitions.
  6. Initialize the partitions that have the PINIT flag set.
  7. Load the new partition and any partition from which records were moved.
  8. Take an image copy of the reloaded data sets. The image copy needed flag is set for the data sets in the partitions that are initialized or loaded by HD Reload.
  9. Resume access to the database as appropriate:
    • If you stopped the entire database, resume access by issuing either the /START DB HALDB_master_name command or the UPDATE DB NAME(HALDB_master_name) START(ACCESS) command. Stopping access to the HALDB master unloads the existing partition selection exit routine from storage.
    • If you stopped only selected partitions, resume access by issuing either the /START DB partition_name command or the UPDATE DB NAME (partition_name) START(ACCESS) command.
  10. If you did not stop access to the entire database and the online IMS system does not immediately recognize the new partition, issue either a /START DB HALDB_Master OPEN or UPDATE DB NAME(HALDB_Master) OPTION(OPEN) command to rebuild all of the online partition structures of the HALDB database specified in the command.

For more information about the sample HALDB Partition Selection exit routine (DFSPSE00), see IMS Version 15.3 Exit Routines.