Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 4: Alternate INDEX


Building Index

  • Records of Alternate Index consists of alternate key and their corresponding primary key pointers. Once the AIX is defined, we have to get this data from the base cluster, then only we will be able to access the records using AIX
  • BLDINDEX command is used to perform this load operation
  • Syntax:-

    BLDINDEX - INDATASET(vsam-cluster-name) - OUTDATASET(alternate-index-name))

  • Where, INDATASET, is used to specify the VSAM base cluster name and OUTDATASET is used to specify the AIX name
  • Example:-

    Building alternate index

    //BUILDAIX EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * BLDINDEX - INDATASET(PAYT.PAY.KSDS) - OUTDATASET(PAYT.PAY.KSDSAIX) /*






© copyright mainframebug.com
Privacy Policy