Creation of an alternate index

Top  Previous  Next

If you want to create an alternate index for an existing base cluster, you should enter 2 in the main menu. The EDITING ALTINDEX INFORMATION map, as shown in the next figure, will then be displayed.

 

On this screen, the following information should be entered :

Catalog Here should be entered the name of the Catalog containing the cluster to which the alternate index belongs to.
Cluster Here the name of the alternate index you intend to create must be specified. It can be maximal 44 characters long.
Primary This field is used to specify the name of the base cluster the alternate index is related to.
Type [D|U] The two possible values are:

D duplicate keys are allowed; it means that it is possible to have different primary keys associated with the same alternate index

U unique; only one primary key may be associated with the alternate index

Nparts This field is used for defining the number of parts the secondary key is composed of. As in case of primary key when defining a cluster, such a feature has no correspondence in the VSAM environment, where the fields which compose also the secondary key must be contiguous, and it is used only for reasons of compatibility with the Siemens product LEASY. In this case a key, being it primary or secondary may also be composed by several not consecutive fields. For VSAM files Nparts is always set to 1, while for ESDS and RRDS files, this field should be kept to zero.
Keys Information about the secondary key should be specified here using the following scheme :

[offset keylength offset keylength ...]

offset is the displacement of the key from the beginning of the record and relative to zero

keylength is the length of the key in bytes.

For VSAM files only one pair of values is allowed, while for LEASY files several pairs can be specified.

The following function keys are available :

PF1 to invoke the on-line help

Cursor keys to move among fields

Escape key to abort the definition of the cluster and to return to the main menu

Enter key to activate the definition