Problem:
Numeric value not recognized in a Signed field during a compare statement
For example
01 WS-VAR.
03 WS-ZERO-X PIC X(3).
03 WS-ZERO REDEFINES WS-ZERO-X PIC S9(3).
03 WS-NUMERIC PIC S9(3).
Procedure Division.
MOVE '000' to WS-ZERO-X
MOVE WS-ZERO to WS-NUMERIC.
IF WS-NUMERIC NOT = 0
.....
ELSE
.....
END-IF.
Where the IF statement is executed instead of the ELSE statement.
Resolution:
Compile programs using the directives SIGN-FIXUP and HOST-NUMCOMPARE.
SIGN-FIXUP provides a limited emulation of the mainframe compiler option NUMPROC(NOPFD) when using the HOST-NUMCOMPARE and HOST-NUMMOVE directives.
#EnterpriseDeveloper
#MFDS