Belwo is the conditiion.
WS-var.
var1 pic 9(3)
var2 pic 9(6) value '999991', '999992'.
var3 pic x(10)
Condition.
if var1 > 0 and var2 Not = 999991 or 999992
move var3 to out-var
end-if
Data is present to satisfy the IF condition. But this code is not checking the second condition after AND.
So I split the code as below.
IF var1 > 0
IF var2 NOT = '999991'
IF var2 NOT = '999992'
MOVE var2 TO out-var
END-IF
END-IF
END-IF
. Can someone tell me what is the issue here and help me to simplfy this code?
WS-var.
var1 pic 9(3)
var2 pic 9(6) value '999991', '999992'.
var3 pic x(10)
Condition.
if var1 > 0 and var2 Not = 999991 or 999992
move var3 to out-var
end-if
Data is present to satisfy the IF condition. But this code is not checking the second condition after AND.
So I split the code as below.
IF var1 > 0
IF var2 NOT = '999991'
IF var2 NOT = '999992'
MOVE var2 TO out-var
END-IF
END-IF
END-IF
. Can someone tell me what is the issue here and help me to simplfy this code?