I constantly use a numeric "switch" like this. For example, if I want to compile a program, I have one switch that is set to 1 for Panvalet source, and 2 for PDS source.
// SET SOURCE=1 1=Panvalet, 2=PDS . . . //TESTSRC IF &SOURCE=1 THEN . . . Extract Panvalet member to tempfile //ELSESRC ELSE . . . Extract PDS member to tempfile //TESTEND ENDIF . . . Then go and compile with tempfile as input. I have lots of other uses for this, like when sending a file to a vendor, I can either terse it or not, and even FTP it or not, based on these switches (// SET FTP=1 or 0 to do it or not) Billy On Wed, May 16, 2018 at 6:43 AM, Jantje. <[email protected]> wrote: > On Tue, 15 May 2018 08:37:36 -0500, Paul Gilmartin <[email protected]> > 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. > > > 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. > > > Cheers, > > Jantje. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Thank you and best regards, *Billy Ashton* ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
