Previous Topic Next topic Print topic


DEFINE ALTERNATEINDEX

The DEFINE ALTERNATEINDEX command creates an alternate index for an existing VSAM data set. It also automatically reindexes the data set to maintain consistency between the data and index files on the PC. The alternate index is contained within the same file as the primary index.

Parameters:

MFJAMS supports the following parameters. They are supported as documented in the IBM documentation unless otherwise stated below:

NAME(data-set-name)
Name of the data set. This parameter is required.
KEYS(length offset)
Length and offset, relative to 0, of the alternate key field. The offset must be within the first 4,096 bytes of the record. Length plus offset must not exceed the maximum length of the record. The default is KEYS(64 0).
UNIQUEKEY
Each alternate key value in the records is unique.
NONUNIQUEKEY
The alternate key values may contain duplicates.
RELATE(data-set-name)
Name of a cataloged VSAM data set to which the alternate index is to be related.

Comments:

  • UNIQUEKEY and NONUNIQUEKEY are mutually exclusive. NONUNIQUEKEY is the default.
  • Because MFJAMS automatically reindexes the data set, the BLDINDEX parameter is assumed even if it is not specified.
  • You can create up to seven alternate indices in one invocation of MFJAMS. Enter separate commands for each index. MFJAMS performs a single reindexing operation for all the alternate indices.
  • MFJAMS does not support the Micro Focus split-key and key-compression features. MSS cannot open a VSAM data set that uses either of these features.
Previous Topic Next topic Print topic