MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OPC - Return Code

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Bhaskar
Beginner


Joined: 06 Jun 2004
Posts: 12
Topics: 5

PostPosted: Sun Jun 06, 2004 11:25 am    Post subject: OPC - Return Code Reply with quote

Hi all,
We are using OPC (Operations Planning & Control) for submitting batch JOBs.
We have 3 JOBs subsequently to be executed.
Based on First job RETURNCCODE (it must be 0) second JOB gets executed and based on second JOB RC...third job gets executed.
Now the problem is even though the first job having problems...its giving Return code as 0 and allowing second job to get executed which should not happen in my case.

How to prevent these situation.
Expcting a solution.


Regards,
Bhaskar
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Sun Jun 06, 2004 6:09 pm    Post subject: Reply with quote

Bhaskar,

Please do not post the same question twice. I deleted your duplicate post.

Do you have cond code checking for each step in your Jobs. If every step in the job is giving a return code of zero then I think it is indeed a successful job. let us say you have a job with 4 steps in the first job

STEP1 - Return code 0
STEP2 - Return code 16
STEP3 - Return code 0
STEP4 - Return code 0

So in the above case step2 had a return code of 16 . you should have a cond codition check to abend the job in step2 itself.

Code:

//STEP2A    EXEC PGM=ABEND99,           
//              COND=(0,EQ,STEP2)     
//SYSUDUMP  DD SYSOUT=*                 
//*   


Here if the return code from step2 is 0 then the job will not abend. But if the return code from this job is anything other 0 then the job will abend preventing other steps from running.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Maton_Man
Beginner


Joined: 30 Jan 2004
Posts: 123
Topics: 0

PostPosted: Mon Jun 07, 2004 11:39 pm    Post subject: Reply with quote

Expecting a solution eh?

Well just make sure the first program doesn't get any problems and the same for the second job and then the third job will run just fine.

There's a solution for you.
_________________
My opinions are exactly that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group