On Fri, 12 Jul 2019 13:05:59 -0700, Lizette Koehler wrote:

>Older JCL Condition Code checking was based on RPN _ Revere Polish Notation
>
Doesn't appear that way to me.  In Polish Postfix (RPN, _ Revere Polish 
Notation)
I'd expect to see not COND=(7,GT,STEP010)
                      but: COND=(7,STEP010,GT)
(or is there a yet older syntax of which I'm unaware?)

>You can use the newer 
>
>https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieab600/ifuse.htm
>
A considerable improvement, IMO.  Especially adding ELSE and supporting nesting.

>//[name] IF  [(]relational-expression[)] THEN   [comments]
>    .
>    .    action when relational-expression is true
>    .
>//[name] ELSE   [comments]
>    .
>    .    action when relational-expression is false
>    .
>//[name] ENDIF   [comments]
>
Alas, the Ref. requires that the [name]s be different but the parser doesn't
enforce that.  If I had been the designer, I'd have made it an enforced
requirement that corresponding label fields be identical.

>> -----Original Message-----
>> From Tony Sambataro
>> Sent: Friday, July 12, 2019 11:34 AM
>> 
>> Having a discussion at our site as to how the jcl below should execute as far
>> a cond code handling. I believe the two steps with COND= coded should both
>> execute. But in my test only the one with a step name coded runs. Would
>> appreciate other opinions.
>> 
>> //STEP000  EXEC PGM=IEFBR14
>> //STEP010  EXEC PGM=IDCAMS
>> //SYSPRINT DD SYSOUT=X
>> //SYSIN    DD *
>>  SET MAXCC=16
>> //STEPA030 EXEC PGM=IEFBR14,COND=(7,GT)
>> //STEPA040 EXEC PGM=IEFBR14,COND=(7,GT,STEP010)
>> 
>> STEP000  IEFBR14  ------------------ R0000
>> STEP010  IDCAMS   ------------------ R0016
>> STEPA030 IEFBR14  ------------------ NXEQ
>> STEPA040 IEFBR14  ------------------ R0000

-- gil

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