Physical twin forward pointers
With physical twin forward (PTF) pointers, each segment occurrence of a given segment type under the same parent points forward to the next segment occurrence.
Note that, except in PHIDAM databases, PTF pointers can be specified for root segments. When this is done in an HDAM or PHDAM database, the root segment points to the next root in the database chained off the same root anchor points (RAP). If no more root segments are chained from this RAP, the PTF pointer is zero.
When PTF pointers are specified for root segments in a HIDAM database, the root segment does not point to the next root in the database.
If you specify PTF pointers on a root segment in a HIDAM database, the HIDAM index must be used for all sequential processing of root segments. Using only PTF pointers increases access time. You can eliminate this overhead by specifying PTF and physical twin backward (PTB) pointers.
You cannot use PTF pointers for root segments in a PHIDAM database. PHIDAM databases only support PTF pointers for dependent segments.
With PTF pointers, the hierarchy is only partly connected. No pointers exist to connect parent and child segments. Physical child pointers can be used to form this connection. PTF pointers should be used when segments in a database record are typically processed randomly, and you do not need sequential processing of database records.
Four bytes are needed for the PTF pointer in each segment occurrence of a given segment type.
If you are defining your database with DBD generation macro statements, PTF pointers are specified by coding PTR=T in the SEGM statement that defines the segment that contains the pointer.
If you are defining your database by using DDL statements, PTF pointers are specified by coding the TWIN parameter in a CREATE or ALTER TABLE statement that defines the segment that contains the pointer.
The following figure show PTF pointers:
