I want to submit a job. Imbeded in the JCL I want the WAIT command. I want to wait till a second job is completed. I do not know the format of the JCL statment. I am using /* AFTER next_job_name,WAIT
What am I missing?
Software/Hardware used:
IBM mainframe
ASKED:
March 22, 2011 6:06 PM
UPDATED:
May 5, 2011 2:20 PM
Basing the execution of one job on the completion of another job is best left to scheduling software. Because, maybe, you only want the second job to run if the first job completes with a RC of less than 5 (or some other condition).
Without a job scheduler, you will need manual intervention from operators. Not a good thing. (In the old days, that is how we ran a series of job streams. Operator would get out the Run Book and submit a job. Then based on the return codes would refer to the Run Book to see what job to run next. Not good.)
You might also consider having the first job submit the second job. Using IF/THEN/ELSE in the first job you can decide to submit the second one or not.