COBOL - Differing answer from mainframe to PC for same COMPUTE
问题 I have this very simple dummy COBOL program which does a dummy COMPUTE and displays the result. ID DIVISION. PROGRAM-ID. DUMMYPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 NUM-A PIC 9(3) VALUE 399. 01 NUM-B PIC 9(3) VALUE 211. 01 NUM-C PIC 9(3). * PROCEDURE DIVISION. MAIN. COMPUTE NUM-C = ((NUM-A / 100) - (NUM-B / 100)) * 100 DISPLAY 'NUM-C IS ' NUM-C STOP RUN. When I compile this code on a mainframe (with compiler MVS Enterprise COBOL V4.2) and execute it, I get "NUM-C IS 100", probably