7 IDCAMS Utility Commands for VSAM Clusters

Utility makes your job is easy. Here are IDCAMS utility commands to use on VSAM cluster.

You can use IDCAMS utility for both VSAM and non-VSAM files.

ALTER – The Alter modifies a catalog, alternative index, cluster and path.

Example to use ALTER

//ALTERE  EXEC PGM=IDCAMS,REGION=4M                           
//SYSPRINT DD   SYSOUT=A
//SYSIN    DD   *                                                
 ALTER CICS.* -                                                   
 NEWNAME(CICSA.*)
/*   
  • BLDINDEX– builds alternate index.
  • Example to use BLDINDEX
  • DEFINE– for alternate index, cluster or path.

Example to define ALTINDEX

//DEFAIX1  JOB   ...
//STEP1    EXEC  PGM=IDCAMS
//SYSPRINT DD    SYSOUT=A
//SYSIN    DD    *
     DEFINE ALTERNATEINDEX -
           (NAME(EXAMPLE.AIX) -
           RELATE(EXAMPLE.KSDS2) -
           KEYS(3 0) -
           RECORDSIZE(40 50) -
           VOLUMES(VSER01) -
           CYLINDERS(3 1) -
           NONUNIQUEKEY -
           UPGRADE) -
         CATALOG(USERCAT)
/*

LISTCAT – lists information about dataset. LISTCAT to list the aliases associated with a catalog.

//LSTALIAS EXEC PGM=IDCAMS
 //SYSPRINT DD SYSOUT=A
 //SYSIN    DD *
     LISTCAT ALL ENTRIES(SYS1.ICFCAT.VSYS303)
 /*
  • PRINT- prints contents.
  • REPRO– copies records from one dataset to other dataset.
  • DELETE– removes catalog entry for catalog, cluster, alternate index, or path.

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.