z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Prime Index

z/OS DFSMS Using Data Sets
SC23-6855-00

A key-sequenced data set always has an index that relates key values to the relative locations of the logical records in a data set. This index is called the prime index. The prime index, or simply index, has two uses:

  • Locate the collating position when inserting records
  • Locate records for retrieval

When a data set is initially loaded, records must be presented to VSAM in key sequence. The index for a key-sequenced data set is built automatically by VSAM as the data set is loaded with records. The index is stored in control intervals. An index control interval contains pointers to index control intervals in the next lower level, or one entry for each data control interval in a control area.

When a data control interval is completely loaded with logical records, free space, and control information, VSAM makes an entry in the index. The entry consists of the highest possible key in the data control interval and a pointer to the beginning of that control interval. The highest possible key in a data control interval is one less than the value of the first key in the next sequential data control interval.

Figure 1 shows that a single index entry, such as 19, contains all the information necessary to locate a logical record in a data control interval.
Figure 1. Relation of Index Entry to Data Control Interval
Figure 2 shows that a single index control interval contains all the information necessary to locate a record in a single data control area.
Figure 2. Relation of Index Entry to Data Control Interval

The index contains the following entries:

  1. A free control interval pointer list, which indicates available free space control intervals. Because this control area has a control interval that is reserved as free space, VSAM places a free space pointer in the index control interval to locate the free space data control interval.
  2. 19, the highest possible key in data control interval 1. This entry points to the beginning of data control interval 1.
  3. 25, the highest possible key in data control interval 2. This entry points to the beginning of data control interval 2.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014