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


Alternate Index Structure for a Key-Sequenced Data Set

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

Figure 1 shows the structure of an alternate index with nonunique keys connected to a key-sequenced data set. The person’s name is the alternate key in this example. The customer number is the primary key.

Figure 1. Alternate Index Structure for a Key-Sequenced Data Set

If you ask to access records with the alternate key of BEN, VSAM does the following:

  1. VSAM scans the index component of the alternate index, looking for a value greater than or equal to BEN.
  2. The entry FRED points VSAM to a data control interval in the alternate index.
  3. VSAM scans the alternate index data control interval looking for an entry that matches the search argument, BEN.
  4. When located, the entry BEN has an associated key, 21. The key, 21, points VSAM to the index component of the base cluster.
  5. VSAM scans the index component for an entry greater than or equal to the search argument, 21.
  6. The index entry, 38, points VSAM to a data control interval in the base cluster. The record with a key of 21 is passed to the application program.

RBAs are always written as fullword binary integers.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014