IDCAMS Lists the file information (LISTCAT) Example


Scenario - List the ESDS file entries.

Input ESDS File - MATEPK.TEST.ESDS

JCL -

----+----1----+----2----+----3----+----4----+----5----+
//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
/*

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

Explaining Example -

In the above example,

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