You are on page 1of 1

Posted: Thu Nov 06, 2003 9:39 am Post subject: ALTERNATE INDEX

--------------------------------------------------------------------------------

Hi ANNANAGARLT,

Apart from access through primary key,VSAM provides use of upto 255 alternate keys
per dataset.

With in the KSDS (or) ESDS retriving a data other than the unique key,with in
alternate index key duplicate data are allowed.

creation of alternate index using the IDCAMS utility there will be three steps

1.DEFINE AIX --> is used to create an alternate index for the field.
2.DEFINE PATH --> it is used to create a path between your main index and AIX.
3.BUILD INDEX -->Once an AIX has defined, records can be loaded into it using the
BLDINDEX command.

EXAMPLE.
/* IDCAMS COMMAND */
DEFINE ALTERNATEINDEX (NAME(SUMAN.KANNAN.AIXVSAM) -
RELATE(SUMAN.KANNAN.VSAM) -
TRACKS(2 2) -
VOLUMES(LMR001 -
) -
CONTROLINTERVALSIZE(4096) -
FREESPACE(10 20) -
RECORDSIZE(20 80) -
KEYS(20 5) -
NONUNIQUEKEY -
UPGRADE -
) -
DATA (NAME(SUMAN.KANNAN.AIXVSAM.DATA) -
) -
INDEX (NAME(SUMAN.KANNAN.AIXVSAM.INDEX) -
)

/* IDCAMS COMMAND */
DEFINE PATH (NAME(SUMAN.KANNAN.PATH) -
PATHENTRY(SUMAN.KANNAN.AIXVSAM) -
UPDATE -
OWNER(LTR040) -
)

/*IDCAMS COMMAND*/
//SYSIN DD *
BLDINDEX INFILE(SUMAN.KANNAN.VSAM)-
OUTFILE(SUMAN.KANNAN.AIXVSAM)

/*

You might also like