TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

VSAM - Listcat Command


The LISTCAT command is provided to list the information from catalog entries. Listcat command provides following information about VSAM datasets.

  • SMS Information

  • RLS Information

  • Volume Information

  • Sphere Information

  • Allocation Information

  • Dataset Attributes

It is almost always a good idea to list the catalog entries for objects immediately following their creation to visually verify that all of the options you intended to specify were entered correctly and had the desired effect on the entry created.

It is also frequently necessary to list fields from the catalog entry for a VSAM object to diagnose problems.


Syntax:

LISTCAT ENTRY(vsam-file-name) ALL

Explanation:

vsam-file-name is the VSAM dataset name for which we need all the information. ALL keyword is specified to get all catalog details.


Example:

Following example shows how to fetch all the details using Listcat command for a VSAM dataset.

//JOBNAME1 JOB 'IBMMAINFRAMER',CLASS=C,PRTY=10,MSGCLASS=C,
//*            MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//STEP001  EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
   LISTCAT ENTRY(racfid.VSAM.KSDSFILE.TEST)
   ALL
/*

If you execute the above JCL. Job should complete successfully with MAXCC = 0 and it will show all the catalog details about racfid.VSAM.KSDSFILE.TEST dataset.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal