JCL wait command

5 pts.
Tags:
IBM Mainframe
JCL
JCL wait
Mainframe
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

There are a few solutions to this issue.

The <b>best</b> solution is to change the submission schedule of the two jobs. Submit the 2nd job first, and when it is finished (successfully), then submit the 1st job.

You can use the TYPRUN=HOLD jobcard parameter when submitting the 1st job, and when the 2nd job is completed, you can then ‘release’ the job that is on HOLD.

I believe you need to know the assigned JES number to release the held job. This can be done manually by the computer operator or if the 2nd job can obtain the JES number, execute a step (in the 2nd job) to release the held job, which does essentially what the operator would do.

The best long term solution (an the most straight forward) is to rearrange the job schedule.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Meandyou
    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.
    5,220 pointsBadges:
    report
  • Williewhale
    [...] JCL wait command [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following