Allocate alternate index (X)


The Allocate Alternate Index function (option X) allocates an alternate index cluster. The alternate-index allocation process is similar to the VSAM cluster allocation process described in Allocate Cluster (A). Two screens are available to define the allocation attributes.

To allocate a new VSAM Alternate Index on a Direct Access device, fill in the following fields of the VSAM utilities panel (VSAM Utility Screen):

  • Enter X in the select option field.
  • Enter the new Alternate Index Name in the dataset name field.
  • Set processing option to O (online) or B (Batch).
  • Enter a Model Dataset Name if the new data set is to have the same allocation characteristics as an existing data set. The model data set must be cataloged and must be accessible through a normal catalog search.
  • If the data set is cataloged in a catalog which is not connected to the master catalog through the high level qualifier, enter the catalog name in the catalog name field and the catalog Password in the catalog password field (if necessary).

When you press Enter, File-AID displays the first Allocate VSAM Alternate Index screen as shown in the following figure . If a model data set was specified, the displayed attributes are those of the model data set. If a model data set was not specified, the attributes are those of the last allocated data set.

At the top of the first Allocate Alternate VSAM Index screen, File-AID displays the component names of the alternate index cluster name specified on the VSAM Utility screen. The names are generated based on the user-defined variables discussed in VSAM data set naming conventions. You can modify Data and Index names.

Allocate Alternate VSAM Index Screen 1

image2021-5-27_10-12-58.png

Field Descriptions

Specify the new cluster’s attributes by verifying or changing the values on the Allocate Alternate VSAM Index screens.

Component Names:

AIX

Fully qualified name of the new VSAM alternate index cluster is displayed for confirmation. If an unqualified name was entered on the VSAM utility screen, File-AID constructs a VSAM cluster name.

Owner ID

The default is your TSO user ID. You may overtype this field. A value of $IAM identifies this cluster as an IAM file.

Data

Data component name. You may overtype this field.

Index

Index name. You may overtype this field.

Volume serial

Specify an alternate index location. Leave blank to allow SMS to select an eligible volume. Eligibility is determined by the "unit" information in your user entry in the TSO "User Attribute Dataset" (UADS).

Important

In some situations you are only allowed to enter eligible volumes even when specifying the volume serial. In other situations you may enter any mounted volume. This is an installation option.

Upgrade

Specify whether VSAM updates the alternate index when the base cluster is modified through additions, deletions or update. Valid entries are Y (Yes) or N (No).

Unique keys

Specify whether VSAM can create duplicate keys for the alternate index. Valid entries are Y (Yes) or N (No).

Base cluster

Specify the name of the related base cluster to be indexed. The name can describe a Key or Entry Sequenced cluster. (KSDS or ESDS) VSAM requires that the base cluster of an alternate index be defined as non-reusable (Reuse option = NO).

You can enter a pattern dataset name in this field to display a list of data sets from which you can make a selection. A pattern dataset name or mask consists of explicit characters or a combination of explicit and pattern characters. See Pattern data set names for a complete description.

Space allocation for data component:

Specify the required storage space of the cluster.

Units

Specify one of the following storage unit types depending on how the data set size is expressed:

TRKS - Tracks
CYLS - Cylinders
RECS - Records.
K - Kilobytes
M - Megabytes.

If the RECS value is specified, File-AID uses the value specified in the Average record size field for the unit quantity.

Primary

Specify the unit quantity.

Secondary

Specify the unit quantity.

Reuseable

Specify whether the cluster is to be reusable (reloadable) without having to delete it:

Y - Yes

N - No.

This option is valid whether the Alternate Index space is sub-allocated or unique.

Data component record/alternate key information:

Average

The average record length, in bytes, of the records to be stored in the alternate index. The following formulas can be used if the alternate index is defined with Unique Keys:


    1. The base cluster is a KSDS

      Record length = 5 + alt key length + base cluster key length.

    2. The base cluster is an ESDS

      Record length = 5 + alt key length + 4.

The following formulas can be used if the alternate index is defined with NON-Unique Keys ( N = Number of base records containing the same alt key):


    1. The base cluster is a KSDS

      Record length = 5 + alt key length + (N x base key length).

    2. The base cluster is an ESDS

      Record length = 5 + alt key length + (N x 4).

Maximum

Specify the maximum record size expected based on the previous formulas. Alternate Index records may be any size up to 32600 bytes.

Important

If both average and maximum record length fields are set to zero, the system defaults of 4086,32600 (average,maximum) will be used.

Key length

The length of the Alternate-Key field in the base cluster's record. Specify a value for the key length between 1 and 255.

Key position

Specify a value relative to zero in the base cluster. To specify the key as the first data position in the record, enter a key position value of 0 (zero).

Data Class

(This field is displayed for SMS sites only.) Specify the SMS data class to use for the allocation of the data set. The data class describes the attributes of the data set such as RECORG, KEYLEN, KEYOFF, SPACE, etc.

Extended allocate

Specify either the letter Y (Yes) or N (No). A value of Y displays the second Allocate Alternate Index screen, which is shown in the following figure. A value on N in this field and File-AID does not display the second allocation specification screen. All other attributes are initialized to the SMS default values or those of the model data set. However, these values are not displayed.

Important

If the model data set is defined for extended allocation, the new data set should be defined with similar allocation attributes.

Allocate Alternate Index Screen 2

image2021-5-27_10-21-52.png

Field Descriptions

Specify control interval characteristics.

Important

If any control interval field is left blank or has a value of 0 (zero), VSAM supplies a value based on the record attributes.

Control interval

Specify a value from 0 to 100 specifying the percentage of space free in a control interval for later processing. If omitted, 0 is assumed.

Control area

Specify a value from 0 to 100 specifying the percentage of space free in a control area for later processing. If omitted, 0 is assumed.

Data C/I size

Specify a numeric value representing the control interval size for the DATA component of the cluster. It must be a multiple of 512 (the minimum value allowed). If not entered, File-AID will calculate a value based on record length.

Index C/I size

Specify a numeric value representing the control interval size for the INDEX component of the cluster. It must be a multiple of 512 (the minimum value allowed). If not entered, File-AID will calculate a value based on record length and Data C/I size.

Buffer space

Specify a numeric value representing the minimum amount of buffer space to be used by a processing program. This value should be a multiple of 512. If not entered, File-AID will calculate a minimum default value.

Allocation options for Cluster:

Region share option

Specify the type of sharing among regions:

1 - Multi-user: read only; single user: read/write

The data set can be shared by any number of users for READ processing. VSAM ensures data integrity.

2 - Multi-user: read; single user: write

The data set can be shared by any number of users for read processing, and can also be accessed by one user for update processing. ENQ/DEQ required for read integrity.

3 - Multi-user: read/write

The data set can be shared by any number of users for read or update processing. Each user is responsible for integrity.

4 - Multi-user: read/write, requires ENQ and DEQ.

The data set can be shared by any number of users for read or update processing, and buffers used for direct processing are refreshed for each request.

System share option

Specify the type of sharing among systems:

3 - Fully-shared system

The data set can be fully shared by all users on all systems. Each user is responsible for read and write integrity.

4 - User is responsible for system integrity.

The data set can be fully shared by all users on all systems. Buffers used for direct processing are refreshed for each request. Reserve/release macros required.

Write check

Enter Y for yes or N for no to specify whether each write operation should be checked for correctness.

Erase on delete

Enter Y for yes or N for no to specify whether a record should be erased from a Control Interval when it is deleted.

Load option

R - Requests the Recovery option, which will cause Data Control Intervals to be preformatted before data records are inserted.

S - Requests the Speed option, which will not preformat Control Intervals.

Exception-Exits (Data and Index components):

The name of a user-written exception-exit routine that receives control when an exceptional I/O error occurs for the Component.

Press Enter to allocate the data set, or use the END command (PF3) to cancel the allocation. When the allocation is complete, File-AID displays the message: DATASET ALLOCATED in the upper-right corner of the VSAM Utility screen. If File-AID finds an error in a field entry, it displays the IDCAMS Functions Display screen with the error message. Use the HELP command (PF1) to display the more information on the error message.

Important

An alternate index must be initialized before it can be updated. New alternate indexes created for an existing base cluster must be initialized, or built, through File-AID option B - BUILD ALTERNATE INDEX option or IDCAMS. To access the base cluster through the alternate index, a VSAM PATH must be created.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*