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 

High RC for one step.

 
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
Anovice
Beginner


Joined: 18 Feb 2004
Posts: 12
Topics: 2

PostPosted: Mon Mar 08, 2004 1:37 am    Post subject: High RC for one step. Reply with quote

How can I allow a high return code omly
for one particular step in a job.
say
STEP1 PGM=A
STEP2 PGM=B
STEP3 PGM=C
STEP4 PGM=D
........
........
STEPn PGM=

Now STEP1 alone can have a return code of 16 and others
should have a return code of 0.
I should execute STEPs 2, 3, 4...even if I get RC <= 16
for STEP1. I tried coding condition codes something like this
COND=((16,LT,STEP1),(0,NE,STEP2),(0,NE,STEP3),... for STEPn.
But it becomes messy as my job has around 30 steps.
Please let me know if anyone has some suggestions.
Back to top
View user's profile Send private message
raggop
Beginner


Joined: 05 Feb 2003
Posts: 19
Topics: 3

PostPosted: Mon Mar 08, 2004 5:10 am    Post subject: Reply with quote

why don't you put steps 2..n in a IF block and check for the RC of step A at the start..


raghu
Back to top
View user's profile Send private message
Anovice
Beginner


Joined: 18 Feb 2004
Posts: 12
Topics: 2

PostPosted: Mon Mar 08, 2004 5:18 am    Post subject: Reply with quote

I forgot to mention something.
I want step2 thru step N to run when return code <= 16. At the sametime
I also want the 0,NE cond code check to exist for the other steps.
I have already thought abt the IF but it wont work. The other steps wont run as a high cond code is produced in the first step. If I code a COND=(16,LT,STEP1) for all steps then any other step too will getaway with a <=16 cond code which I dont want to happen.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Mar 08, 2004 6:34 am    Post subject: Reply with quote

Anovice,

code an abend statement as below after each step from step2 to step N except for step 1.

Code:

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

i.e

Code:

STEP1 PGM=A
STEP2 PGM=B
//STEP2A    EXEC PGM=ABEND99,           
//              COND=(0,EQ,STEP2A)     
//SYSUDUMP  DD SYSOUT=*                 
//*   
STEP3 PGM=C
//STEP3A    EXEC PGM=ABEND99,           
//              COND=(0,EQ,STEP3A)     
//SYSUDUMP  DD SYSOUT=*                 
//*   

STEP4 PGM=D
........
........
STEPn PGM=
//STEPNA    EXEC PGM=ABEND99,           
//              COND=(0,EQ,STEPNA)     
//SYSUDUMP  DD SYSOUT=*                 
//*   


So if any of the steps get an return code other than zero this abend step will execuete and job will stop its execuetion.

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
Anovice
Beginner


Joined: 18 Feb 2004
Posts: 12
Topics: 2

PostPosted: Mon Mar 08, 2004 7:03 am    Post subject: Reply with quote

Thanks Kolusu,

Iam also trying a combination of IF ELSE construct and COND CODE to arrive at a solution. I have to give my customer these options for him to choose.
Back to top
View user's profile Send private message
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Mon Mar 08, 2004 9:17 am    Post subject: Reply with quote

Note that ABEND99 is presumably site-specific (e.g. our equivalent is called GDIABEND). You may have an equivalent already, or you may need to write one if you don't. Ask your sysprogs...
Back to top
View user's profile Send private message
Anovice
Beginner


Joined: 18 Feb 2004
Posts: 12
Topics: 2

PostPosted: Mon Mar 08, 2004 10:28 pm    Post subject: Reply with quote

Thanks all for your suggestions.
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