How to check the database status and execute the step?

JES2/3, JCL, utilities.
Previous topicNext topic

Topic Author
RyanFox
Registered Member
Posts: 43
Joined: Sat Jun 15, 2013 12:54 pm
Zodiac: Sagittarius

How to check the database status and execute the step?

Post by RyanFox » Fri Oct 13, 2017 5:49 pm

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: 1375
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

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

Post by Robert Sample » Fri Oct 13, 2017 7:33 pm

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.



Previous topicNext topic

Return to ā€œJCL - Job Control Language.ā€