The definition of a user catalog

  • Post category:Catalog
  • Reading time:1 mins read

Ok another short one: just a small JCL script with working example for the definition of a user catalog. This would accompany the example of the alias definition for a user catalog that can be found here.

//DEFCAT   EXEC PGM=IDCAMS                               
//SYSPRINT DD SYSOUT=*                                  
//SYSIN    DD *                                       
DEFINE UCAT (NAME(SYS1.USERCAT.PROD) VOLUME(DASD1B) - 
        CYL(6,1) ICFCAT  )          

Enjoy.

Pierre G.

How to copy the contents of a catalog: IDCAMS

  • Post category:Catalog
  • Reading time:1 mins read

A very short one, but regularly asked by my mentees: how to copy the contents of a catalog? Just use IDCAMS’ REPRO facility, like you would for a regular VSAM dataset

//COPYCAT   EXEC PGM=IDCAMS                           
//SYSPRINT DD SYSOUT=*                         
//SYSIN    DD *                                      
REPRO  INDATASET(CATALOG.MVSICFM.VD9ECAT) -         
        OUTDATASET(SYS1.MSTRCTLG)    

//Pierre G

Define an ALIAS for your User Catalog

  • Post category:Catalog
  • Reading time:1 mins read

This JCL defines an ALIAS in the current master catalog. The alias points to the user catalog named in the RELATE clause.

Use a STEPCAT pointing to another master catalog when needed.

//DEFCAT   EXEC PGM=IDCAMS 
//* STEPCAT DD DISP=SHR etc when needed     
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *        
  DEF ALIAS (NAME(PROD) RELATE(SYS1.USERCAT.PROD)) 
/*
//

//Pierre G