这是我为我的 COBOL 类做的一个示例程序,当我尝试通过命令行编译时,我遇到了一些错误代码的问题。请看下文。COBOL 下面是我的终端代码。如何修复“意外的标识符”?
IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE135.
AUTHOR. ME.
ENVIRONMENT DIVISION.
DATA DIVISION.
77 FIELD-A PIC 9(2).
77 FIELD-B PIC 9(2).
77 FIELD-C PIC 9(3) VALUE ZERO.
77 FIELD-D PIC 9(3) VALUE ZERO.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
FIRST-PARAGRAPH.
MOVE ZEROS TO FIELD-A FIELD-B.
PERFORM SECOND-PARAGRAPH.
PERFORM THIRD-PARAGRAPH.
PERFORM SECOND-PARAGRAPH.
PERFORM WRITE-DATA.
STOP RUN.
SECOND-PARAGRAPH.
ADD 10 TO FIELD-A.
ADD 20 TO FIELD-B.
THIRD-PARAGRAPH.
MULTIPLY FIELD-A BY FIELD-B GIVING FIELD-C.
DIVIDE FIELD-A INTO FIELD-B GIVING FIELD-D.
WRITE-DATA.
DISPLAY FIELD-A.
DISPLAY FIELD-B.
DISPLAY FIELD-C.
DISPLAY FIELD-D.
END PROGRAM.
Sample2.cbl:9: Error: syntax error, unexpected "Identifier", expecting "end of file"