Overview of partitioning HDAM databases
You use a randomizing routine to partition HDAM databases. Currently for HDAM databases, the randomizing routine is passed the root key, the number of blocks in the database, and the number of RAPs in each block. The randomizer returns the block and RAP number in the RAA (RAA) to use when inserting or retrieving the root.
Partitioned HDAM randomizers work very much the same way — with one difference — the randomizer spreads the RAA and the HDAM overflow across multiple partitions.
Overflow is used for segments that cannot be stored in the RAA and in current HDAM databases, the overflow is at the end of the RAA. With partitioned HDAM, each partition has its own overflow area at the end of the RAA. and is used for segments that cannot be stored in the RAA of that partition.
The number of blocks in the RAA and the CI/block size can be different in each partition; however, the randomizing routine and number of RAPs per block must be the same for all partitions.
The HDAM randomizing routine tells DL/1 which partition to use when inserting or retrieving the root. There are two ways for the randomizing routine to tell DL/1 which partition to use:
- Use the “standard” DL/1 interface and randomize across the entire database.
- Use the “DEDB” interface and use a “two-stage” randomizer
You can use the same randomizing routine for both nonpartitioned and partitioned HDAM databases. There is no need to change the randomizing routine when converting an HDAM database to a partitioned database. The DEDB interface is also supported for more control of which partition is selected.
Randomizing HDAM Databases
As an alternative to the DEDB interface and two-stage randomizer, you can use a partition selection routine to select one or more partitions. The partition selection routine is called before the HDAM randomizer to randomize to a block and RAP number within each partition. The number of blocks passed to the randomizer is the number of RAA blocks in the partition selected.
Partition Selection Routine
An alternative to both the two-stage randomizer and partition selection routine is to use highkeys with HDAM to establish key ranges. A partition selection routine might be convenient because any part of the key can be used to determine the partition. If using key ranges is sufficient, highkeys may offer a better method to provide a two-stage partition selection process. After BMC AMI Partition Facility for IMS selects a partition based on the highkey, the randomizer is called to randomize within the partition. As with a partition selection routine, the number of blocks passed to the randomizer is the number of RAA blocks in the partition selected.
Highkeys
The following sections describe the randomizing routines in detail. For more information about the partition selection routine, see “Using a Partition Selection Routine”.