On Wed, 16 May 2018 05:43:39 -0500, Jantje. wrote: >On Tue, 15 May 2018 08:37:36 -0500, Paul Gilmartin wrote: > >>I believe the only comparisons supported by IF are to a result, such as a >>return >>code, of a previous step. > >All examples given do indeed lead one to believe that, but the actual >documentation does not specify such a requirement. It does say that the parts >to be compared in the expression must be numeric. > I don't see where you find "must be numeric" although it makes sense. Can you supply more context?
>https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieab600/relationexp.htm > says: ><quote> >A relational-expression consists of: >Comparison operators >Logical operators >NOT (¬) operators >Relational-expression keywords >Numeric values ></quote> > >I did the test, comparing a symbol (that has a numeric value assigned to it) >to a constant numeric value and it works just fine. No RC in my test. > In: z/OS IBM MVS JCL Reference Version 2 Release 3 SA23-1385-30 Chapter 18. IF/THEN/ELSE/ENDIF statement construct Description Relational-expression field 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. ... does not say a numeric value may be compared to another numeric value. (But it doesn't explicitly prohibit it.) I'll submit an RCF. It also doesn't specify the order of the operands. Are "4 = RC" and "RC = 4" both valid? 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. ... lists several keywords. "numeric value" is not listed as a keyword. The "even if accepted" clause is a cowardly excuse for not supplying proper warnings on use of unsupported constructs. But Peter Relson has said that such constructs are reserved for present or future use within IBM. I can't respect that. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
