David, That’s a much better approach, I think easier and more readable, imho.
Scott On Thu, Oct 11, 2018 at 10:34 PM David Crayford <[email protected]> wrote: > On 11/10/2018 10:44 PM, Paul Gilmartin wrote: > > On Thu, 11 Oct 2018 11:54:06 +0800, David Crayford wrote: > > > >> That code looks dodgy! Unless I'm losing my marbles the test ((APPID <> > >> 'VI01') | (APPID <> 'VI02')) will always be true. > >> > > Vernacular. Some casually say, "if APPID is not V101 or V102", then code > > incorrectly ((APPID <> 'VI01') | (APPID <> 'VI02')) when it should be > > ((APPID <> 'VI01') & (APPID <> 'VI02')). I've even seen such as > > APPID <> V101 | V102. Some compilers accept that, with unintended > > result. > > I've found in REXX it's better to use something like: > > if wordpos(appid, "VI01 VI02") = 0 then ... > > instead of complicated boolean expressions. > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- Scott Ford IDMWORKS z/OS Development ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
