JCL Error if Dataset not found

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
Priyanka Sandeep
Member
Posts: 5
Joined: Tue Oct 06, 2009 1:53 am

JCL Error if Dataset not found

Post by Priyanka Sandeep » Tue Oct 06, 2009 2:19 am

Hi,


I have a JCL which takes a list of around 200 input datasets and returns the record count of each dataset it is working fine but if one of the dataset defined in the jcl doesn't exist then the JCL is failing during compilation itself how to overcome that?

I am writing the record count to the o/p dataset in which i want the record count along with the dataset name how can we do it?

Can anyone please help me out in this?Since i am new to mainframe.

Regards,
Priyanka.

Gerry Ciccheti
Member
Posts: 16
Joined: Thu Jul 30, 2009 7:52 am

Post by Gerry Ciccheti » Tue Oct 06, 2009 6:04 am

Hi,
you can run the IDCAMS LISTCAT command in batch and then scan the output of the listcat and see if the datasets are currently cataloged.


Gerry

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Tue Oct 06, 2009 11:36 am

I agree with Gerry. If you are not sure, whether data set will exists at that time of job execution, it is advisable to check the availability of dataset, before using that file.
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Oct 06, 2009 7:12 pm

JCL is failing during compilation itself
Pardon my ignorance, what is "compilation" in context of JCL?
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others