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