View previous topic :: View next topic |
Author |
Message |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Wed Feb 16, 2005 1:19 pm Post subject: precedence rules COND parameters JCL |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Wed Feb 16, 2005 4:30 pm Post subject: |
|
|
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 |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Sat Feb 19, 2005 6:07 pm Post subject: |
|
|
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.  _________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
dtf Beginner
Joined: 10 Dec 2004 Posts: 110 Topics: 8 Location: Colorado USA
|
Posted: Sun Feb 20, 2005 7:52 pm Post subject: |
|
|
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 |
|
 |
Mervyn Moderator

Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Mon Feb 21, 2005 5:58 am Post subject: |
|
|
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 |
|
 |
|
|