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


Building an Alternate Index

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

When an alternate index is built by BLDINDEX processing, the alternate index's volume and the base cluster's volume must be mounted. Any volumes identified with the WORKFILES parameter must also be mounted. If one of the data sets identified by the WORKFILES ddname is system managed, the other data set must be either a system-managed data set or a non-system-managed data set cataloged in the catalog determined by the catalog search order. The base cluster cannot be empty (that is, its high-used RBA value cannot be zero). Each record's alternate key value must be unique, unless the alternate index was defined with the NONUNIQUEKEY attribute.

Access method services opens the base cluster to read the data records sequentially, sorts the information obtained from the data records, and builds the alternate index data records.

The base cluster's data records are read and information is extracted to form the key-pointer pair:
  • When the base cluster is entry sequenced, the alternate-key value and the data record's RBA form the key-pointer pair.
  • When the base cluster is key sequenced, the alternate-key value and the primary-key value of the data set record form the key-pointer pair.

The key-pointer pairs are sorted in ascending alternate-key order.

After the key-pointer pairs are sorted into ascending alternate key order, access method services builds alternate index records for key-pointer pairs. When all alternate index records are built and loaded into the alternate index, the alternate index and its base cluster are closed.

Related reading: For information about calculating the amount of virtual storage required to sort records, using the BLDINDEX command, and the catalog search order, see z/OS DFSMS Access Method Services Commands.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014