On Sun, 8 Nov 2009 23:16:48 -0600, Joel C. Ewing wrote:

>More explicitly, the JCL reference manual states:
>"Use comparison operators in a relational-expression to compare a
>keyword with a numeric value."
>
>This doesn't directly address the special case where two numeric values
>(after substitution)  are being compared - in fact nowhere is it stated
>that comparison of two values where neither is a keyword is a legal
>syntax, although we know from empirical evidence it works with two
>numerics.
>
This is dreadful!  If the comparison doesn't work as expected,
IBM's out is to say you broke the rules, but they provide no
error message.

And nearby:

    17.1.4.5 "z/OS V1R11.0 MVS JCL Reference"
    17.1.4.5 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 elsewhere nearby:

    17.1.9 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 
listed in the
       preceding topic (that is, RC, ABEND, ...). Any other symbolic 
parameters, even if
       accepted by the system, are not intended or supported.

So,

    //  SET X='STEP.RC'
    //  IF (&X=4) THEN

is apparently supported, but:

    //  SET Y=4
    //  IF (STEP.RC=&Y) THEN

is unsupported.

Both the JCL parser and the doc should mutually be revised so that
all constructs "accepted by the system" are described as "supported"
and/or constructs not described as "supported" such as the OP
attempted result in JCL errors.

A BNF syntax diagram would be useful here.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to