z/OS DFSMS Access Method Services Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Build an Alternate-Index over a Key-Sequenced Data Set (KSDS) Using DFSORT: Example 2

z/OS DFSMS Access Method Services Commands
SC23-6846-01

This example, using DFSORT, 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
//SYSPRINT DD   SYSOUT=A
//SYSIN    DD   *
  BLDINDEX INFILE(BASEDD) -
           OUTFILE(AIXDD/AIXUPPW) -
           SORTCALL -
           SORTMESSAGELEVEL(ALL)
/*
Job control language statements:
  • BASEDD DD describes the base cluster.
  • AIXDD DD describes the alternate index.

The BLDINDEX command builds an alternate index. BLDINDEX calls DFSORT to sort the alternate index records. If DFSORT is not available, BLDINDEX uses its own sort routines.

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.
  • SORTCALL tells BLDINDEX to call DFSORT to sort the alternate index records. This parameter is the default.
  • SORTMESSAGELEVEL(ALL) requires that all DFSORT messages and control statements are returned in the DFSORT message data set.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014