On Fri, 15 Apr 2011 09:50:02 +0930, Patrick Welsh wrote: > >I have a situation where I want to submit 12 batch jobs in order, with an MVS >command to bring a volume online between jobs 2 and 3. > >I could ask Ops Support to use the automation product to set up some rules for >this, however as a training exercise I was looking to do it without using >Control. > Reportedly JES3 will do this for you. I haven't tried it.
>I can get the jobs to submit in the correct order by using the INTRDR, but >this does not wait untill one job is finished before the next starts. > In fact, there's no guarantee they'll run in the order submitted. Each job could have a final step to submit the next to INTRDR. You could create a collection of named pipes. Each job could write a token to its named pipe with a BPXBATCH or IEBGENER step. Each succeeding job could read a token with an initial step. All jobs would initiate, but none would proceed to the next step until the previous completed. >Ideally I would also like to trap the return code of the previous job and use >this to conditionally submit the following job or halt the process. > COND= in the submit step? IMO, it's rocket science (I.e. not described in the JCL RM) for a job to trap its own RC (or that of another job). But if you wrap the PGM in Rexx, you could write its RC to that named pipe. The succeeding job could read that RC in an initial IDCAMS step which would terminate with that RC. An IF ... ELSE could control execution of the rest of the job. Can you not make one enormous job with suitable COND= or IF statements? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

