Think of it as "execute this step *unless*
COND=(CC,is{GT|GE|EQ|LT|LE}[{,some prior step|any prior step}]) is true".
 
Bear in mind that COND= will not apply to prior step(s) that were not
executed.
 
E.g.
"STEP000 EXEC PGM=IEFBR14" will execute with CC=00.
"STEP010 EXEC PGM=IEFBR14,COND=(0,LE,STEP000)" will not execute because
STEP000 did execute.
"STEP020 EXEC PGM=IEFBR14,COND=(0,LE,STEP010)" will execute because
STEP010 did not execute.
 

 
 
 


On 15/07/2019 19:40, Paul Gilmartin wrote:
> On Mon, 15 Jul 2019 16:51:43 +0100, CM Poncelet wrote:
>
>> If '//STEP000 EXEC PGM=IEFBR14' is commented out, then 'STEPA030' will
>> execute with CC=00 instead of NXEQ'd.*
>> * 
> Of course you're right.  I was misled by a strong habit I have.  When coding
> tests, I try to put the notional variable on the left; the notional constant 
> on
> the right.  I'd code in most other languages:
>     IF ( CC < 7 )
> never:
>     IF ( 7 > CC )
> ... but JCL wouldn't allow my habitual:
>     //STEPA040 EXEC PGM=IEFBR14,COND=(STEP010,LT,7))
> or, especially:
>     //STEPA030 EXEC PGM=IEFBR14,COND=(LT,7)
>
> So I misunderstood:
>     //STEPA030 EXEC PGM=IEFBR14,COND=(7,GT)
>     //STEPA040 EXEC PGM=IEFBR14,COND=(7,GT,STEP010)
>
> Where languages allow it, do other programmers generally code
> the variable on the left or the right?  I find it jarring to see:
>     IF ( 7 > CC )
> (... but my habits were not formed by the syntax of JCL COND or CLI.)
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> .
>


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to