To check if a sequential File is available or not . This step may be required when the system is expecting a file to be created by another step or to be sent by an external source into the mainframe.

This can be achieved with different JCL utilities such as IDCAMS etc

1.Using IDCAMS

In IDCAMS, the LISTCAT can be used to check the availability of files. LISTCAT stands for LIST CATlog entries and is used to list catalog entries.It is also used to view dataset attributes, usage statistics, allocations information etc.

If the file is available, this step will give RC 00, else the return code will be 04.

//EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  LISTCAT ENTRIES (‘<input file>’)
/*