Lists the file information (LISTCAT)


The LISTCAT command is used to view dataset attributes, usage statistics, space allocation information, security information, creation and expiration information, etc. LISTCAT means LIST CATalog entry. It is useful when listing attributes and characteristics of all VSAM and non-VSAM files in a VSAM or ICF catalog.

Syntax -

//JOBNAME  JOB job-card-parameters
//STEP1    EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  LISTCAT [ALIAS | 
  	[ALTERNATEINDEX | 
	CLUSTER | DATA |
	INDEX | NONVSAM |
	PATH | SPACE |
	USERCATALOG]
  	[OUTFILE(ddname)]
  	[ENTRIES(entry-name1...)]
  	[PREFIX | NOPREFIX]
  	[NAME | VOLUME | ALLOCATION | ALL]
  [CATALOG(catalog-name)]
/*

Parameters


  • ALIAS | ALTERNATEINDEX | CLUSTER | DATA | INDEX | NONVSAM | PATH | SPACE | USERCATALOG - Specifies the entry type to be listed.
  • ENTRIES(entry-name1...) - specifies the entries to be listed.
  • 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.
  • NAME - Lists the specified name and its type entries.
  • VOLUME - lists the information about the device type where the dataset resides. Short Description: VOL
  • ALLOCATION - Lists the allocation 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.
  • CATALOG (catname) - Specifies the name of the catalog where the path will be defined. Short Description: CAT

Example -


Scenario - List the ESDS file entries.

Input ESDS File - MATEPK.TEST.ESDS

JCL -

----+----1----+----2----+----3----+----4----+----5----+
...
//STEP10   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD  *
     LISTCAT ENTRIES(MATEPK.EMPL.ESDS) ALL
/*
...

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.

LISTCAT Sysprint