HDAM database structure
An HDAM database consists of one data set which is split into two parts: the root addressable part and the overflow part.
The data set is a VSAM ESDS or OSAM data set.
The following figure illustrates how the database record would appear in an HDAM database.
After initial load, segments within a database record are very likely to be grouped together in blocks/CIs in hierarchical order. After update activity, this may not be the case. The following figure represents the status after some update activity: SEGC1, SEGE1, SEGE2, SEGG2, and SEGG4 were inserted.
To insert a root segment, IMS first invokes the HDAM randomizer that has been specified in the DBD. This will determine the RAP from which this root must been chained. In the example, the RAP has other roots which have randomized to the same RAP; one has a key lower than SEGA1 and other(s) have higher keys. This results in a chain of roots from the RAP on which SEGA1 is the second.
Once a segment has been inserted in a HDAM database, the segment is never moved in order to preserve all the direct address pointers. The example assumes physical child first pointers and twin forward pointers are specified for all segment types. If, as in the case under consideration, there are more segments in the database record at initial load than the BYTES parameter in the DBD will allow to be inserted in the RAA, then all other segments will be inserted into overflow. This is also true for multiple inserts of segments within the same database record during the same synchronization point.
If segments are deleted from the database segment, they will be physically deleted from the data set, and the space will be designated as free space.
If the database were to use multiple data set groups, each secondary data set group would have the format of the overflow part of an HDAM database.
Related topic