LISTCAT Command (for Experienced)


The LISTCAT command is used to view dataset attributes, usage statistics, space allocation information, security information, creation and expiration information, etc.

LISTCAT command stands for LIST CATalog entry and lists catalog entries.

It is useful when listing attributes and characteristics of all VSAM and non-VSAM objects in a VSAM or ICF catalog.

High-level syntax -


//JOBNAME  JOB job-card-parameters
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  LISTCAT
/*

Detail syntax -


//JOBNAME  JOB job-card-parameters
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  LISTCAT [ALIAS]
  	[ALTERNATEINDEX]
  	[CLUSTER]
  	[DATA]
  	[GENERATIONDATAGROUP]
  	[INDEX]
  	[NONVSAM]
  	[PAGESPACE]
  	[PATH]
  	[USERCATALOG]
  	[CREATION(days)]
  	[ENTRIES(entry-name [ entry-name...])|
  	  LEVEL(level)]
  	[PREFIX|NOPREFIX]
  	[EXPIRATION(days)]
  	[FILE(ddname)]
  	[LIBRARY(libname)]
  	[NAME|HISTORY|VOLUME| ALLOCATION|ALL]
  	[OUTFILE(ddname)]
  [CATALOG(catalog-name)]
/*

Parameters


The LISTCAT command has no mandatory parameters. All parameters are optional and those are specified below -

Optional Parameters


ALTERNATEINDEX


  • ALTERNATEINDEX lists the alternate index entries.
  • If ALTERNATEINDEX is specified and DATA and INDEX are not specified, the alternate index entries alone are listed.

Short Description: AIX

CLUSTER


  • CLUSTER lists cluster entries.
  • If CLUSTER is specified and DATA and INDEX are not specified, the cluster entries alone are listed.

Short Description: CL

DATA


  • DATA lists cluster's or alternate index's data component entries.

INDEX


  • INDEX lists cluster's or alternate index's index component entries. Short Description: IX

NONVSAM


  • NONVSAM lists non-VSAM datasets entries. Short Description: NVSAM

PAGESPACE


  • PAGESPACE lists page space entries. Short Description: PGSPC

PATH


  • PATH lists path entries.

USERCATALOG


  • USERCATALOG lists the catalog connectors entries from the master catalog. Short Description: UCAT

CATALOG (catname )


  • CATALOG specifies the catalog name that contains the entries to be listed. Short Description: CAT

CREATION (days)


  • CREATION(days) lists the specified type (CLUSTER, DATA, etc.) entries created provided days ago or earlier.
  • The maximum number of days is 9999, and zero specifies that all entries are to be listed.

Short Description: CREAT

ENTRIES (entry-name [ entry-name...])


  • List the entries of the name or generic name of each entry. Short Description: ENT

PREFIX | NOPREFIX


  • PREFIX specifies that the user ID should add as a prefix to all the entries enclosed in quotes.
  • NOPREFIX specifies that the user ID should not add as a prefix to all the entries enclosed in quotes.

EXPIRATION (days)


  • EXPIRATION(days) lists the specified type (CLUSTER, DATA, etc.) entries expiring in the specified days or earlier.
  • The maximum number of days is 9999, indicating that all entries are to be listed.
  • Zero means that only entries that have already expired are to be listed.

Short Description: EXPIR

FILE (ddname)


  • FILE(ddname) lists the devices and volumes entries that the DDname identifies.

LIBRARY (libname)


  • Lists tape volume entries identified by the specified tape library name. Short Description: LIB

NAME


  • Lists the specified name and its type entries.

HISTORY


  • Lists the below information for each name entry - name, entry type, ownerid, creation date, expiration date, and release. Short Description: HIST

VOLUME


  • The VOLUME option lists the information about the device type and one or more volumes the serial number of the storage volumes where the dataset resides. Short Description: VOL

ALLOCATION


  • Lists the allocation information by specifying VOLUME plus detailed information. Short Description: ALLOC

ALL


  • Lists all fields information that are not listed under the NAME, HISTORY, VOLUME, ALLOCATION options, CA-RECLAIM, RLSDATA, ATTRIBUTES, and STATISTICS.

OUTFILE (ddname)


  • Lists the dataset catalog entries specified by ddname. Short Description: OFILE

Example -


Requirement - List the ESDS file entries.

Input ESDS File - MATEPK.TEST.ESDS

Code -

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKL JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),            
//             NOTIFY=&SYSUID                                           
//************************************************************          
//* LISTCAT COMMAND                                                     
//************************************************************          
//STEP10   EXEC PGM=IDCAMS                                              
//SYSPRINT DD SYSOUT=*                                                  
//SYSIN    DD  *                                                        
     LISTCAT ENTRIES(MATEPK.EMPL.ESDS) ALL                              
/*                                                                      
//*                                                                     
**************************** Bottom of Data ****************************

In the above JCL, MATEPK is the userid and change it as required.

Output -

Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, then listing is successful.

********************************* TOP OF DATA ********************************************************************
IDCAMS  SYSTEM SERVICES                                           TIME: 06:34:02        04/09/22     PAGE      1      

     LISTCAT ENTRIES(MATEPK.EMPL.ESDS) ALL                                      
CLUSTER ------- MATEPK.EMPL.ESDS                                                
     IN-CAT --- CATALOG.Z113.MASTER                                             
     HISTORY                                                                    
       DATASET-OWNER-----(NULL)     CREATION--------2022.099                    
       RELEASE----------------2     EXPIRATION------0000.000                    
       EATTR-------------(NULL)                                                 
       BWO STATUS--------(NULL)     BWO TIMESTAMP-----(NULL)                    
       BWO---------------(NULL)                                                 
     PROTECTION-PSWD-----(NULL)     RACF----------------(NO)                    
     ASSOCIATIONS                                                               
       DATA-----MATEPK.EMPL.ESDS.DATA                                           
   DATA ------- MATEPK.EMPL.ESDS.DATA                                           
     IN-CAT --- CATALOG.Z113.MASTER                                             
     HISTORY                                                                    
       DATASET-OWNER-----(NULL)     CREATION--------2022.099                    
       RELEASE----------------2     EXPIRATION------0000.000                    
       ACCOUNT-INFO-----------------------------------(NULL)                    
     PROTECTION-PSWD-----(NULL)     RACF----------------(NO)                    
     ASSOCIATIONS                                                               
       CLUSTER--MATEPK.EMPL.ESDS                                                
     ATTRIBUTES                                                                 
       KEYLEN-----------------0     AVGLRECL--------------47     BUFSPACE------------8192     CISIZE--------------4096
       RKP--------------------0     MAXLRECL--------------47     EXCPEXIT----------(NULL)     CI/CA----------------180
       SHROPTNS(1,3)   RECOVERY     UNIQUE           NOERASE     NONINDEXED    NOWRITECHK     UNORDERED          REUSE
       NONSPANNED                                                               
     STATISTICS                                                                 
       REC-TOTAL--------------0     SPLITS-CI--------------0     EXCPS------------------0
       REC-DELETED------------0     SPLITS-CA--------------0     EXTENTS----------------1
       REC-INSERTED-----------0     FREESPACE-%CI----------0     SYSTEM-TIMESTAMP:       
       REC-UPDATED------------0     FREESPACE-%CA----------0          X'0000000000000000'
       REC-RETRIEVED----------0     FREESPC----------1474560                    
     ALLOCATION                                                                 
       SPACE-TYPE------CYLINDER     HI-A-RBA---------1474560                    
       SPACE-PRI--------------2     HI-U-RBA---------------0                    
       SPACE-SEC--------------1                                                 
     VOLUME                                                                     
       VOLSER------------DEVHD4     PHYREC-SIZE---------4096     HI-A-RBA---------1474560     EXTENT-NUMBER----------1
       DEVTYPE------X'3010200F'     PHYRECS/TRK-----------12     HI-U-RBA---------------0     EXTENT-TYPE--------X'40'
       VOLFLAG------------PRIME     TRACKS/CA-------------15                    
       EXTENTS:                                                                 
       LOW-CCHH-----X'03C80000'     LOW-RBA----------------0     TRACKS----------------30                             
       HIGH-CCHH----X'03C9000E'     HIGH-RBA---------1474559                    
IDCAMS  SYSTEM SERVICES                                           TIME: 06:34:02        04/09/22     PAGE      2
         THE NUMBER OF ENTRIES PROCESSED WAS:                                   
                   AIX -------------------0                                     
                   ALIAS -----------------0                                     
                   CLUSTER ---------------1                                     
                   DATA ------------------1                                     
                   GDG -------------------0                                     
                   INDEX -----------------0                                     
                   NONVSAM ---------------0                                     
                   PAGESPACE -------------0                                     
                   PATH ------------------0                                     
                   SPACE -----------------0                                     
                   USERCATALOG -----------0                                     
                   TAPELIBRARY -----------0                                     
                   TAPEVOLUME ------------0                                     
                   TOTAL -----------------2                                     
         THE NUMBER OF PROTECTED ENTRIES SUPPRESSED WAS 0                       
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0                       
                                                                                
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0               
******************************** BOTTOM OF DATA ******************************************************************

Explaining Example -

In the above example,

  • LISTCAT ENTRIES(MATEPK.EMPL.ESDS) ALL lists the ESDS dataset all entries.