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


Defining Alternate Indexes

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

An alternate index is a key-sequenced data set containing index entries organized by the alternate keys of its associated base data records. It provides another way of locating records in the data component of a cluster.

An alternate index can be defined over a key-sequenced or entry-sequenced cluster. An alternate index cannot be defined for a reusable cluster, a fixed- or variable-length RRDS, an extended addressable ESDS, a catalog, a VVDS (data set name 'SYS1.VVDS.Vvolser'), another alternate index, a linear data set, or a non-VSAM data set. The data class parameter can be specified for a system-managed alternate index. Access method services DEFINE will assign the same management class and storage class as the alternate index's base cluster. If a base cluster is defined as extended format, then the alternate index it relates to must be able to be defined as extended format. Alternate indexes cannot be compressed. See Access to Records through Alternate Indexes for information about the structure of an alternate index.

The sequence for building an alternate index is as follows:

  1. Define the base cluster, using either the ALLOCATE command, the DEFINE CLUSTER command, or JCL.
  2. Load the base cluster either by using the REPRO command or by writing your own program to load the data set.
  3. Define the alternate index, using the DEFINE ALTERNATEINDEX command.
  4. Relate the alternate index to the base cluster, using the DEFINE PATH command. The base cluster and alternate index are described by entries in the same catalog.
  5. Build the alternate index, using the BLDINDEX command.
VSAM uses three catalog entries to describe an alternate index:
  • An alternate index entry describes the alternate index as a key-sequenced cluster.
  • A data entry describes the alternate index's data component.
  • An index entry describes the alternate index's index component.

Except for data class, attributes of the alternate index's data and index components can be specified separately from the attributes of the whole alternate index. If attributes are specified for the whole alternate index and not for the data and index components, these attributes (except for password and USVR security attributes) apply to the components as well. If the attributes are specified for the components, they override any attributes specified for the entire alternate index.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014