On Fri, 5 Jun 2020 20:17:06 +0000, Gibney, Dave wrote:
>Using OP
> IF TVOLL (IND1) NOT = HIGH-VALUE
> AND SMOD (IND1) = 'B' OR 'R'
>
>I would do
> IF TVOLL (IND1) NOT = HIGH-VALUE
> IF SMOD (IND1) = 'B' OR 'R'
> Do the stuff
>
I have (almost) never coded COBOL, so I have trouble wrapping my head around:
SMOD (IND1) = 'B' OR 'R'
Does it mean:
( SMOD (IND1) = 'B' ) OR 'R' or
SMOD (IND1) = ( 'B' OR 'R' ) or (implied Distributive Law):
SMOD (IND1) = 'B' OR SMOD (IND1) = 'R'
I'd have even more trouble with:
SMOD (IND1) NOT = 'B' OR 'R'
SMOD (IND1) NOT = 'B' OR SMOD (IND1) NOT = 'R'
... which seems to be a verbose expression for TRUE. I've
seen programmers fall into that trap.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN