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


Building of an Alternate Index

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

When you build an alternate index, the alternate key can be any field in the base data set's records that has a fixed length and a fixed position in each record. The alternate-key field must be in the first segment of a spanned record. Keys in the data component of an alternate index are not compressed; the entire key is represented in the alternate-index data record.

A search for a given alternate key reads all the base cluster records containing this alternate key. For example, Figure 1 and Figure 1 show that one salesman has several customers. For the key-sequenced data set, several primary-key pointers (customer numbers) are in the alternate-index data record. There is one for each occurrence of the alternate key (salesman's name) in the base data set. For the entry-sequenced data set, several RBA pointers are in the alternate index data record. There is one for each occurrence of the alternate key (salesman's name) in the base data set. The pointers are ordered by arrival time.

Before a base cluster can be accessed through an alternate index, a path must be defined. A path provides a way to gain access to the base data through a specific alternate index. To define a path use the access method services command DEFINE PATH.

For information about defining an alternate index, see Defining Alternate Indexes. For information about defining a path, see Defining a Path.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014