HD databases using multiple data set groups

You can define as many as ten data set groups when you use multiple data set groups.

The root segment in a database record must be in the primary data set group.

In the database record shown in the following figure, the segments COURSE (1), INSTR (2), LOC (4), and STUDENT (5) could go in one data set group, while segments REPORT (3) and GRADE (6) could go in a second data set group.

Figure 1. Example of how to divide an HD database record
begin figure description. This figure is described in the surrounding text. end figure description.
Examples of how the HD database record shown in the above figure might be divided into three groups are in the following table.
Table 1. Examples of multiple data set grouping
Data set group 1 Data set group 2 Data set group 3
Segment 1 Segments 2, 5, and 6 Segments 3 and 4
Segments 1, 3, and 6 Segments 2 and 5 Segment 3
Segments 1, 3, and 6 Segments 2 and 5 Segment 4

Segments that are separated into different data set groups must be connected by physical child first pointers. For example, in the following figure, the INSTR segment in the primary data set group must point to the first occurrence of its physical child REPORT in the secondary data set group, and STUDENT must point to GRADE.

Figure 2. Connecting segments in multiple data set groups using physical child first pointers
Shown in the figure are segments separated into different data set groups that must be connected by physical child first pointers.