Page 1 of 1

Identifying job return code in run time

Posted: Thu Aug 27, 2015 12:32 pm
by vinoth4u
Hi ,

In REXX , i have requirement like "Multiple jobs needs to be submitted" means after successful execution of each job ,next job should start.

In run time ,how can i find the return code of one job,so that next next job should pursue ?

Thanks in advance !!

Regards,
Vinoth

Re: Identifying job return code in run time

Posted: Thu Aug 27, 2015 1:57 pm
by nicc
If this is production then the scheduler will handle that. In test you need to run IKJEFT01 as the last step. It should execute depending on condition codes. What it will do when it executes is submit the next job.

Re: Identifying job return code in run time

Posted: Thu Aug 27, 2015 6:18 pm
by Robert Sample
In REXX , i have requirement like "Multiple jobs needs to be submitted" means after successful execution of each job ,next job should start.
Doing this from your REXX code is a really, REALLY, REALLY bad design. What if the job needs a tape mount and all the tape drives are being used -- the job will wait, possibly for quite a long time, while your REXX code is doing nothing but waiting? As alluded elsewhere, chain the jobs so as each one successfully completes it submits the next in sequence. And, by the way, this is PRECISELY the situation where a job scheduler is MOST effective (and it doesn't require extra steps in the jobs).

Re: Identifying job return code in run time

Posted: Fri Aug 28, 2015 5:41 pm
by vinoth4u
Nic,

Thanks for your suggestion !

We can use IKJEFT01 to evaluate Steps in the job.But for job evaluation how can we use it ?

Could you please explain it briefly with example codes ?

Thanks!

Regards,
Vinoth KM

Re: Identifying job return code in run time

Posted: Fri Aug 28, 2015 5:57 pm
by Robert Sample
Find the JCL Reference manual for your version of z/OS.
Find the chapter on the IF/THEN/ELSE/ENDIF statements.
Read it and apply it to your isse (there are even examples provided).

Re: Identifying job return code in run time

Posted: Mon Sep 07, 2015 3:35 pm
by Anuj Dhawan
vinoth4u wrote:We can use IKJEFT01 to evaluate Steps in the job.But for job evaluation how can we use it ?
What are you asking here? Can you please elaborate?