Next source is a snippet of a sample application compiled with MF and NetCobol. MF returns 'equal' and NC 'not equal'. What's going on? We are investigating a port from MF to NC.
03 TABEL1 VALUES ZEROES.
05 XITAB1 PIC S9 OCCURS 10 TIMES INDEXED BY XI1.
03 TABEL2 VALUES ZEROES.
05 XITAB2 PIC S9 OCCURS 10 TIMES.
PROCEDURE DIVISION.
HOOFDPROGRAMMA SECTION.
HOOFD.
PERFORM VARYING XI1 FROM 1 BY 1 UNTIL XI1 > 10
COMPUTE XITAB1(XI1) = XITAB1(XI1) + 0
END-PERFORM.
IF TABEL1 = TABEL2
DISPLAY "EQUAL"
ELSE
DISPLAY "NOT EQUAL"
END-IF.
03 TABEL1 VALUES ZEROES.
05 XITAB1 PIC S9 OCCURS 10 TIMES INDEXED BY XI1.
03 TABEL2 VALUES ZEROES.
05 XITAB2 PIC S9 OCCURS 10 TIMES.
PROCEDURE DIVISION.
HOOFDPROGRAMMA SECTION.
HOOFD.
PERFORM VARYING XI1 FROM 1 BY 1 UNTIL XI1 > 10
COMPUTE XITAB1(XI1) = XITAB1(XI1) + 0
END-PERFORM.
IF TABEL1 = TABEL2
DISPLAY "EQUAL"
ELSE
DISPLAY "NOT EQUAL"
END-IF.