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 

COND parameter

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


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Sat Jun 19, 2004 1:01 am    Post subject: COND parameter Reply with quote

I've the following setup -

//STEP010 EXEC PGM=XXXX
//STEP020 EXEC PGM=SORT

Now, I want to execute the SORT step only if the return code from previous step(execution of program XXXX) is either 00 or 16. For all other return codes, the sort step should be skipped.

Any help regarding how to code COND parameter for this to achieve will be highly appreciated.

Also,is there any way to restart a job from a step which is present in Catalogued procedure called by the JCL?

Thanks!
_________________
Regards,
Mangsk
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
NutCracker
Beginner


Joined: 13 Dec 2002
Posts: 45
Topics: 3
Location: 3rd Block from the SUN

PostPosted: Sat Jun 19, 2004 3:05 am    Post subject: Reply with quote

Code:

//STEP010 EXEC PGM=XXX
 :
 :
// IF (STEP010.RC EQ 00 OR STEP010.RC EQ 16)
//STEP020 EXEC PGM=SORT
 :
 :
// ENDIF


or

Code:

//STEP010 EXEC PGM=XXX
 :
 :
//STEP020 EXEC PGM=SORT,
//           COND=((0,NE,STEP010),OR,(16,NE,STEP010))
 :
 :
Back to top
View user's profile Send private message
mangsk
Beginner


Joined: 05 Jun 2004
Posts: 46
Topics: 18

PostPosted: Sat Jun 19, 2004 3:47 am    Post subject: Reply with quote

NutCracker,
I think the 2nd solution won't work.
//STEP010 EXEC PGM=XXX
:
:
//STEP020 EXEC PGM=SORT,
// COND=((0,NE,STEP010),OR,(16,NE,STEP010))
:

Because the STEP will be BYPASSED if any of the condition becomes true. So,for example,if MAXCC=0 for STEP010, 2nd part of condition will be true and STEP020 will be bypassed Sad
And my requirement is, I want to execute the SORT step only if the return code from previous step(execution of program XXXX) is either 00 or 16. For all other return codes, the sort step should be skipped. Very Happy
_________________
Regards,
Mangsk
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Sat Jun 19, 2004 7:40 am    Post subject: Reply with quote

Mangsk,

Cond parameter can only do 'or' condition but not an 'and' condition. So your other choice is to code the IF/THEN/ELSE/ENDIF Construct.

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