Build an Alternate-Index over a Key-Sequenced Data Set (KSDS): Example 1
This example builds an alternate index over a previously defined
base cluster, EXAMPLE.KSDS2. Data records are already loaded into
the base cluster. The alternate index, its path, and its base cluster
are all defined in the same catalog, USERCAT.
//BUILDAIX JOB ...
//STEP1 EXEC PGM=IDCAMS
//BASEDD DD DSNAME=EXAMPLE.KSDS2,DISP=OLD
//AIXDD DD DSNAME=EXAMPLE.AIX,DISP=OLD
//IDCUT1 DD DSNAME=SORT.WORK.ONE,DISP=OLD,AMP='AMORG',
// VOL=SER=VSER01,UNIT=DISK
//IDCUT2 DD DSNAME=SORT.WORK.TWO,DISP=OLD,AMP='AMORG',
// VOL=SER=VSER01,UNIT=DISK
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
BLDINDEX INFILE(BASEDD) -
OUTFILE(AIXDD) -
NOSORTCALL -
CATALOG(USERCAT)
/*
Job control language statements:
- BASEDD DD describes the base cluster.
- AIXDD DD describes the alternate index.
- IDCUT1 and IDCUT2 DD describe volumes available as sort work data sets if an external sort is done. They are not used by BLDINDEX if enough virtual storage is available for an internal sort. If there are multiple volumes, a maximum of five volumes for each work file can be specified.
The BLDINDEX command builds an alternate index. If there is not enough virtual storage for an internal sort, DD statements with the default ddnames of IDCUT1 and IDCUT2 are given for two external-sort work data sets.
The parameters are:
- INFILE names the base cluster. The ddname of the DD statement for this object must be identical to this name.
- OUTFILE names the alternate index. The ddname of the DD statement for this object must be identical to this name.
- CATALOG identifies the user catalog.