How to check the database status and execute the step?

JES2/3, JCL, utilities.
Post Reply
RyanFox
Registered Member
Posts: 52
Joined: Sat Jun 15, 2013 12:54 pm

How to check the database status and execute the step?

Post by RyanFox »

Hi,

One of our Job fails every now and then for the reason that database is locked. The Job is scheduled to run when CICS is active. Can we somehow check the status of the database and based on that execute the step of the Job? This way, step might retry to execute after some delay.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: How to check the database status and execute the step?

Post by Robert Sample »

Can we somehow check the status of the database and based on that execute the step of the Job? This way, step might retry to execute after some delay.
JCL does not allow for delay or retry of steps -- they run in sequence and that's it. Furthermore, once JCL goes through the converter / interpreter phase it CANNOT be changed in any way.

You probably will need to write a program to check the status; it can set a return code to test in the job. Retrying would require using a scheduler.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”