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 

precedence rules COND parameters JCL

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


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Wed Feb 16, 2005 1:19 pm    Post subject: precedence rules COND parameters JCL Reply with quote

I am somewhat mystified by this.........

We have a JCL stream that executes steps both instream and via proc. If based upon condition code checking, I allow a step to execute a proc, the condition code checking within the proc itself does not appear to work.

Code:

//STEP1 EXEC PGM=PGM1
//STEP2 EXEC PROC1,COND=(88,EQ,STEP1)


Assuming STEP1 sets a condition code of zero, STEP2 will execute. However, under this scenerio we are having trouble selectivly executing steps within the PROC executed by STEP2.

within PROC1, we have

Code:

//PSTEP1 EXEC PGM=SET88      SETS COND CODE=88
//PSTEP2 EXEC PGM=IEFBR14,COND=(88,EQ,PSTEP1)


PSTEP1 of this proc sets a COND CODE of 88. Even so, PSTEP2 executes. I have tried COND=(88,EQ,STEP2.PSTEP1) as well to no avail.
________
spice weed


Last edited by dtf on Tue Feb 01, 2011 1:46 pm; edited 1 time in total
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 Feb 16, 2005 2:38 pm    Post subject: Reply with quote

Dtf,

Take a look at this .

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/16.5.5?SHELF=&DT=20030423085347&CASE=

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


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Wed Feb 16, 2005 4:30 pm    Post subject: Reply with quote

Well...... I read the DOC, thanks. Still it does not make a lot of sense to me. What I gleaned from running some test is that if you code a COND parameter on the EXEC of the step that executes the proc, it essentially nullifies all the COND checking within the proc itself.

This seems both wrong & stupid to me. But then I never really did like the way COND checking was designed (Me and a whole bunch of other people), and I suppose that is why the modern version uses "IF" logic.

DTF
________
volcano vaporizer


Last edited by dtf on Tue Feb 01, 2011 1:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Sat Feb 19, 2005 6:07 pm    Post subject: Reply with quote

Hi DTF,

Have you tried:
Code:

//STEP1 EXEC PGM=PGM1
//STEP2 EXEC PROC1,COND.PSTEP2=(88,EQ,PSTEP1)


I think that's the way to code it, but it might be the other way round (PSTEP2.COND). with Professor Backwards' baby, you never know. Smile
_________________
Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
Back to top
View user's profile Send private message
dtf
Beginner


Joined: 10 Dec 2004
Posts: 110
Topics: 8
Location: Colorado USA

PostPosted: Sun Feb 20, 2005 7:52 pm    Post subject: Reply with quote

Jack,

Certainly there are ways around this, but the issue is that there is condition code checking which already exist within the PROC that is being rendered useless if a condition code is TESTED on the EXEC which includes the execution of the PROC.

Regards,
Dave
________
Motor Manufacturing de Baja California


Last edited by dtf on Tue Feb 01, 2011 1:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Feb 21, 2005 5:58 am    Post subject: Reply with quote

I think the issue is that the condition code is not being tested on the EXEC that is invoking PROC1. Rather, the COND is being passed to PROC1 as an override (see Kolusu's link above).

The solution is to use IF in the calling PROC instead.
_________________
The day you stop learning the dinosaur becomes extinct
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