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 

CONDITION CODING WITH "OR" WITHOUT IF/THEN/ELSE

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


Joined: 11 Jun 2004
Posts: 2
Topics: 1

PostPosted: Wed Apr 26, 2006 9:05 am    Post subject: CONDITION CODING WITH "OR" WITHOUT IF/THEN/ELSE Reply with quote

Here is my problem. My installation does not allow the use of the "IF/THEN/ELSE" for condition code checking.

I need to find out how to condition code an EXEC statement that will execute IF ANY of the preceeding steps gets a RC GE 8 and not to execute if all of the preceeding steps get a RC EQ 0.

Is there a way to do this with the COND parameter?

I can do it quite easily with the IF/THEN/ELSE but I cannot get it to work with the COND.

HELP, please!
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Apr 26, 2006 12:47 pm    Post subject: Reply with quote

Can you post an example of what you've tried so far?
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
Treybrooke
Beginner


Joined: 11 Jun 2004
Posts: 2
Topics: 1

PostPosted: Wed Apr 26, 2006 12:53 pm    Post subject: Reply with quote

Quote:
Can you post an example of what you've tried so far?

Code:

//STEP04   EXEC PGM=IEFBR14,                               
//         COND=((0,EQ,STEP01),(0,EQ,STEP02),(0,EQ,STEP03))
THIS WORKS IF ALL ARE 0 BUT IF ANY ARE 8, THIS STEP IS BYPASSED AND I NEED IT TO EXECUTE

//STEP04   EXEC PGM=IEFBR14,                               
//         COND=((8,NE,STEP01),(8,NE,STEP02),(8,NE,STEP03))
SAME RESULTS AS MY FIRST TEST

I have tried several other combinations but have since deleted the results.
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: Wed Apr 26, 2006 1:21 pm    Post subject: Reply with quote

Treybrooke,

You cannot code an "OR" with a COND parm. You need a IF-THEN-ELSE. It might be tedious but why not code the cond after each step for all the 8 steps?

Code:

//STEP0100 EXEC PGM=YOUR PGM,
//...

//STEP0101 EXEC PGM=IEFBR14,             
//             COND=(8,GE,STEP0100) 
//*
//STEP0200 EXEC PGM=YOUR PGM,
//...

//STEP0201 EXEC PGM=IEFBR14,             
//             COND=(8,GE,STEP0200) 
...


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