Root anchor point structure
Root anchor points (RAPs) exist in HDAM databases and in HIDAM databases where twin forward pointers have been specified for the root segment.
The following figure shows the format of the RAP.

A RAP is a four-byte RBA which points to a root segment. The RAP area is formed of one or more RAPs adjacent to each other. RAPs do not exist except in the RAP area.
HDAM | The DBD of an HDAM database specifies the number of RAPs per block or CI (the second parameter of RMNAME on the DBD statement). It also specifies how many blocks or CIs are to form the root addressable part of the database (the third parameter of RMNAME on the DBD statement). Only the blocks in the root addressable part of the database contain RAP areas. The randomizer will select a RAP from which the root is to be chained, and the four-byte RBA of the segment is stored in the RAP. This may not necessarily be in the same block/CI as the RAP. If more than one root randomizes to the same RAP, the roots are chained in ascending key sequence. Thus the RAP will point to the root with the lowest key that randomizes to that RAP. If the RAP contains binary zero, no root has randomized to it. |
|---|---|
HIDAM | A block/CI in a HIDAM database can contain a single RAP if twin forward pointers or hierarchical forward pointers (as opposed to twin backward pointers or hierarchical backward pointers) have been specified for the root segment. This form of RAP will contain the four-byte RBA of the last root segment to be inserted into that block. The rest of the root segments in that block are chained together in last-in, first-out (LIFO) order using twin forward pointers or hierarchical forward pointers. |