Page 1 of 1

How to check the database status and execute the step?

Posted: Fri Oct 13, 2017 5:49 pm
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.

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

Posted: Fri Oct 13, 2017 7:33 pm
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.