The following four-byte fields can be in this area, and if present, they will occur in the order indicated below.
Counter
If the segment has a logical relationship which is unidirectional or bidirectional with physical pairing, then a four-byte counter will exist.
Hierarchical or Physical Twin Pointers
A hierarchical forward pointer or a twin forward pointer must be present in the segment prefix, unless PTR=NOTWIN was specified in the SEGM statement. Hierarchical backward pointers or twin backward pointers can also be present (PTR=HB or PTR=TB on SEGM statement).
Physical Parent Pointer
This pointer will be present if the segment is a logical child or has a logical child below it in the hierarchy. It will also be generated if the segment is a logical parent or has a logical parent below it in the hierarchy.
It is also present in any segments which are target segments for a secondary index or lie on the hierarchical paths between the root segment and any target segments.
Logical Twin Pointers
A logical twin forward pointer and a logical twin backward pointer will only exist in a logical child segment that has a bidirectional logical relationship that is virtually paired. A logical twin backward pointer will be present if LTWINBWD is specified on the SEGM statement of the logical child segment.
Logical Parent Pointer
A logical child segment can have a direct pointer to its logical parent (PHYSICAL specified on SEGM statement) if the logical parent is in an HD database.
Logical Child Pointers
If the segment is a logical parent and has one or more logical relationships that are bidirectional with virtual pairing, then for each relationship there will be a four-byte RBA pointer to the first logical child segment (a logical child first pointer). There can also be a four-byte RBA pointer to the last logical child segment (a logical child last pointer), depending on whether SNGL or DBLE is specified on the LCHILD statement. The pointers will be in the order that the logical relationships are defined in the DBD, with a logical child first pointer before a logical child last pointer.
Physical Child Pointers
If physical pointers rather than hierarchical pointers have been chosen for the segment, there will be a four-byte RBA pointer to the first physical child segment (a physical child first pointer). There can also be a four-byte RBA pointer to the last physical child segment (a physical child last pointer). The pointers will be in the order that the physical children are defined in the DBD, with a physical child first pointer before a physical child last pointer.
The following figure shows a logical parent with unidirectional relationships, two bidirectional virtually paired relationships (the second with backward pointers), and three physical segments (the second with backward pointers).
Example counter and pointers in a typical HD-type segment
