Adding a partition that defines a new highest high key

You might add a partition that has a higher high key than any existing partition, if the keys in your HALDB database are based on time or on an ascending value. As the key values increase, you can add new partitions to hold new records.

To add a partition that will define a new highest high key for your HALDB database:

Procedure

  1. If records from any other partition will be moved into the new partition, stop access to the partitions from which records will be moved by issuing either the /DBRECOVERY DB partition_name command or the UPDATE DB NAME(partition_name) STOP(ACCESS) command.
  2. If records from any other partition will be moved into the new partition, unload the partitions from which records will be moved.
  3. Define the new partition, specifying an appropriate high key, such as X'FF'.
  4. If necessary, modify the high key of the partition that previously had the highest high key to avoid having two partitions with a high key of X'FF'.
  5. Initialize the new partition and any partitions from which records were moved.
  6. If necessary, load the new partition and any partitions from which records were moved. The image copy needed flag is set for the data sets in the new partition.
  7. Make the partitions available again by issuing either the /START DB partition_name command or the UPDATE DB NAME (partition_name) START(ACCESS) command.
  8. If 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.

The following figure illustrates the addition of a partition that defines a new highest high key for a HALDB database. The key for the database is based on time. The high order part of the key contains the year. There is a partition for each year. A new partition is required for each new year. There are no records with keys above 2007zzz. Before they are added to the database, partition D with a high key of 2008zzz is added. Because no records are moved from an existing partition, they are not affected.

Figure 1. Adding a higher key partition with key range partitioning