Alternate Index is a cross reference to a base table.
The JCL to allocate the Alternate Index is as shown below.
//AIXDEF JOB (ACCT),’AIX DEFINE’
//ALLOCATE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE AIX –
RECORDSIZE (47,47)) –
Line 1 ~ The JOB card can be different based on installation standards.
Line 2 ~ The EXEC statement invokes the access method services.
Line 3 ~ The SYSPRINT will contain all messages from the AMS program.
Line 4 ~ The SYSIN card indicates that the instream data containing the functional commands and their parameters follow.
Line 5 ~ DEFINE AIX is the functional command used to allocate an Alternate index.
Line 6 ~ The NAME parameter indicates the name of the Alternate index.
Line 7 ~ RELATE gives the name of base cluster to which the Alternate index is related.
Line 8 ~ The VOLUMES parameter indicates the volume serial on which the space for the AIX cluster will be allocated.
Line 9 ~ The CYLINDERS parameter indicates that 10 cylinders of primary space will be allocated. When this space is used up secondary space will be allocated in increments of 2 cylinders each.
Line 10 ~ The CONTROLINTERVALSIZE (CISZ) for the AIX cluster will be 2048 bytes.
Line 11 ~ The FREESPACE parameter means that at the time of initial loading, each control interval will have 10 percent of its space left free and that 20 percent of control intervals in each control area will be left unused.
Line 12 ~ The KEYS parameter indicates that the alternate key is 10 bytes long and starts at position 6 (seventh byte) of the record.
Line 13 ~ NONUNIQUEKEY indicate that the alternate index can have duplicate keys. Ex. Multiple students can have the same name.
Line 14 ~ UPGRADE option makes the alternate index part of the upgrade set of the base cluster.
Line 15 ~ RECORDSIZE parameters indicates the average and maximum record lengths in that order.
Line 16 ~ DATA indicates the beginning of the data component parameters.
Line 17 ~ NAME indicates the name of the data component of the cluster.
Line 18 ~ INDEX indicates the beginning of the index component parameters.
Line 19 ~ NAME indicates the name of the index component of the cluster.
Line 20 ~ The instream data is terminated by a ‘/*’ delimiter.