When to use multiple data set groups
When you design database records, you design them to meet the processing requirements of many applications. You decide what segments will be in a database record and their hierarchical sequence within a database record.
These decisions are based on what works best for all of your application program's requirements. However, the way in which you arranged segments in a database record no doubt suits the processing requirements of some applications better than others. For example, look at the two database records shown in the following figure. Both of them contain the same segments, but the hierarchical sequence of segments is different.

The hierarchy on the top favors applications that need to access INSTR and LOC segments. The hierarchy on the bottom favors applications that need to access STUDENT and GRADE segments. (Favor, in this context, means that access to the segments is faster.) If the applications that access the INSTR and LOC segments are more important than the ones that access the STUDENT and GRADE segments, you can use the database record on the left. But if both applications are equally important, you can split the database record into different data set groups. This will give both types of applications good access to the segments each needs.
To split the database record, you would use two data set groups. As shown in the following figure, the first data set group contains the COURSE, INSTR, REPORT, and LOC segments. The second data set group contains the STUDENT and GRADE segments.

Other uses of multiple data set groups include:
- Separating infrequently-used segments from high-use segments.
- Separating segments that frequently have information added to them from those that do not. For the former segments, you might specify additional free space so conditions are optimum for additions.
- Separating segments that are added or deleted frequently from those that are not. This can keep space from being fragmented in the main database.
- Separating segments whose size varies greatly from the average segment size. This can improve use of space in the database. Remember, the bitmap in an HD database indicates whether space is available for the longest segment type defined in the data set group. It does not keep track of smaller amounts of space. If you have one or more segment types that are large, available space for smaller segments will not be utilized, because the bitmap does not track it.