Identifying job return code in run time

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
vinoth4u
New Member
Posts: 6
Joined: Fri Aug 14, 2015 3:37 pm

Identifying job return code in run time

Post 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
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Identifying job return code in run time

Post 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.
Regards
Nic
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Identifying job return code in run time

Post 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).
vinoth4u
New Member
Posts: 6
Joined: Fri Aug 14, 2015 3:37 pm

Re: Identifying job return code in run time

Post 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
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Identifying job return code in run time

Post 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).
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Identifying job return code in run time

Post 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?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”