On Thu, 11 Nov 2021 12:56:21 -0600, Wendell Lovewell  wrote:

>Billy's example explains it very well.  
>
( that apparently refers to:
    //  SET RUNTEST1=0 )

>A) "IF" cannot be the first step, thus his IEFBR14 call
>B) "IF" only allows numerics.  // IF (&DOTHIS="YES") will not work like you 
>want, but // IF (&DOTHIS=1) or // IF (&DOTHIS=0) will work. I don't know how 
>high of a value you can check, but I've used up to 5 (for day-of-the-week) 
>successfully. 
>
Repeating what I said earlier:

Be careful.  The JCL Ref. states some peculiarly harsh syntax rules, then:
    Relational-expression keywords
        The following keywords are the only keywords supported by IBM and
        recommended for use in relational- expressions. Any other keywords,
        even if accepted by the system, are not intended or supported keywords.

And further:

Comparison operators
Use comparison operators in a relational-expression to compare a keyword with a 
numeric value. The comparison results in a true or false condition.
    ...
Considerations when using the IF/THEN/ELSE/ENDIF construct
    ...
• You can specify symbolic parameters on IF/THEN/ELSE/ENDIF statements provided 
that they resolve to one of the supported relational-expression keywords. Any 
other symbolic parameters, even if accepted by the system, are not intended or 
supported. Refer to “Relational-expression keywords” on page 366.

You are relying on constructs which "... even if accepted by the system, 
are not intended or supported."

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to