Physical child first pointers

With physical child first (PCF) pointers, each parent segment in a database record points to the first occurrence of each of its immediately dependent child segment types.

The following figure shows PCF pointers:

Figure 1. Physical child first pointers
COURSE points to INSTR, first LOC, and first STUDENT. INSTR points to EDUC and EXPR.

With PCF pointers, the hierarchy is only partly connected. No pointers exist to connect occurrences of the same segment type under a parent. Physical twin pointers can be used to form this connection. Use PCF pointers when segments in a database record are typically processed randomly and either sequence fields are defined for the segment type, or if not defined, the insert rule is FIRST or HERE. If sequence fields are not defined and new segments are inserted at the end of existing segment occurrences, the combination of PCF and physical child last (PCL) pointers (explained next) can be a better choice.

Four bytes are needed in each parent segment for each PCF pointer.

PCF pointers are specified by coding PARENT=((name,SNGL)) in the SEGM statement in the DBD. This is the SEGM statement for the child being pointed to, not the SEGM statement for the parent. Note, however, that the pointer is stored in the parent segment.

If you are using DDL, PCF pointers are specified by coding the FOREIGN KEY clause in the CREATE TABLE statement for the database as FOREIGN KEY REFERENCES table_name SINGLE. This is the table for the child being pointed to, not the table for the parent. Again, note that the pointer is stored in the parent segment.