Define an Alternate Index with RECATALOG: Example 4
In this example, an alternate index is redefined into a catalog.
//DEFAIXR JOB ...
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DEFINE ALTERNATEINDEX -
(NAME(DEFAIXR.AIX01) -
RELATE(DEFKSDS.KSDS03) -
CYLINDERS(2 1) -
VOLUMES(333001) -
RECATALOG) -
CATALOG(USERCAT4)
/*
This DEFINE ALTERNATEINDEX command re-catalogs an alternate index
entry, a data entry, and an index entry to redefine the alternate
index, DEFAIXR.AIX01. The VSAM volume record (VVR) entry and the corresponding
VTOC entry for the alternate index must exist. Only the catalog entry
is re-cataloged, so no space is allocated. The command's parameters
are:
- NAME indicates the alternate index's name, DEFAIXR.AIX01.
- RELATE identifies the alternate index base cluster, DEFKSDS.KSDS03.
- CYLINDERS allocates two cylinders for the alternate index's space. The alternate index is extended in increments of one cylinder.
- VOLUMES places the alternate index on volume 333001. This example assumes that a VTOC entry already exists for this object.
- RECATALOG re-catalogs the alternate index and uses the existing VVR entry and VTOC entry.
- CATALOG defines the alternate index in the user catalog, USERCAT4.