HALDB partition reorganization numbers
IMS assigns and maintains a reorganization number for each partition to ensure the integrity of data across database reorganizations.
IMS also uses the reorganization number in the HALDB self-healing pointer process after reorganizations of HALDB partitions that use either logical relationships or secondary indexes.
The reorganization number is stored in the following places in each partition:
- In the first block of the first database data set in each partition
- In the indirect list key (ILK) included in every segment in the partition
- In the extended pointer set (EPS) of each secondary index entry and each logical child segment
- In each indirect list entry (ILE) in the ILDS for each secondary index target segment and each logical parent segment
Reorganization numbers can become corrupt if the HALDB reorganization number verification function is not enabled and either a reorganization fails to increment the reorganization number of a partition correctly or a segment that has a low reorganization number in its EPS is moved into a partition and lowers the reorganization number of the destination partition.
A corrupt reorganization number is difficult to detect. If you do not use logical relationships or secondary indexes, a corrupt reorganization number does not cause any immediate problems. However, if you later add either logical relationships or secondary indexes to a HALDB database that has a corrupt reorganization number, you are likely to lose data.
To ensure the consistency of partition reorganization numbers, enable the HALDB reorganization number verification function. The HALDB reorganization number verification function records the reorganization number of each partition in the RECON data set and ensures that reorganization numbers are always incremented properly. When enabled, the HALDB reorganization number verification function applies to all HALDB databases that are recorded in the RECON data set.
To enable the HALDB reorganization number verification function:
- Issue either of the DBRC commands
INIT.RECON REORGV
orCHANGE.RECON REORGV
or either of the type-1 commands/RMINIT DBRC='RECON REORGV'
or/RMCHANGE DBRC='RECON REORGV'
. - Run a program that updates at least one record in each partition in each HALDB database that is registered in the RECON data set.
When you enable the HALDB reorganization number verification function, the reorganization numbers for all HALDB partitions in the RECON data set are reset to zero. Accessing a record in each partition updates the RECON data set with the current reorganization number that is stored in each partition.