Re: IF statement, I don't understand this




"Jack Benny" <pkline@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2akn2295mqoqg2hok7b2vs96okhdug438a@xxxxxxxxxx
This is Unisys A-series C74,
I have
000600 01 SHH-SHIP-CODE PIC 9 VALUE 1.
000700 01 ASM010-I-DIR PIC X VALUE "R".
and
001000 IF SHH-SHIP-CODE = 5 AND ASM010-I-DIR = "L" OR "R" OR "S"
001100 DISPLAY "TRUE"
001200 ELSE
001300 DISPLAY "FALSE".
001400 ENDIF.

It comes up "TRUE" and I don't understand why. It doesn't seem right.


You could use the following:

IF SHH-SHIP-CODE = 5
IF ASM010-I-DIR = "L" OR "R" OR "S"
DISPLAY "TRUE"
ELSE
DISPLAY "FALSE"
ELSE
DISPLAY "FALSE".



.