GnuCOBOL 不使用我传递的选项处理我的遗留 COBOL 代码

问题描述 投票:0回答:1

我正在尝试将旧的 IBM 大型机代码提供给 GnuCOBOL,但它只是给出了大量语法错误。有什么想法如何修复吗?我尝试使用

-std=cobol85
-std=ibm
-std=mf
中的每一个,但都没有改变错误。这是部分代码:

00001  IDENTIFICATION DIVISION.                                         08/21/03
00002  PROGRAM-ID. DH06D41J.                                            DH06D41J
00003  AUTHOR. XXXX XXXXX-ORIGINAL,XXXXXX XXXXXX,AND XXXXX XXXX.           LV022
00004 **********************************************************        DH06D41J
00005 *REMARKS. THIS PROCEDURE FORMATS THE NAME FIELD.                  DH06D41J
00006 *         INPUT FIELD LENGTH AND NAME FIELD.                      DH06D41J
00007 ************************************************************      DH06D41J
00008 *                                                          *      DH06D41J
00009 *                                                          *      DH06D41J
00010 *                                                          *      DH06D41J
00011 * -----------+-------------+------------------------------ *      DH06D41J
00012 *            |             |                               *      DH06D41J
00013 * 08/25/2003 | XXXX XXXXXXX| CHANGE BACKSLASH (\) TO SPACE *      DH06D41J
00014 *            |             | IN LN DATA (DE892)            *      DH06D41J
00015 *            |             |                               *      DH06D41J
00016 * 07/31/2003 | XXXX XXXXXXX| ADD 'ZCCL' TO VALID-DATA4     *      DH06D41J
00017 *            |             | (RE: DEFECT DE880)            *      DH06D41J
00018 *            |             |                               *      DH06D41J
00019 * 02/09/2001 | XXXXX XXXXX | RECOMPILE                     *      DH06D41J
00020 *            |             |                               *      DH06D41J
00021 * 05/09/2000 | XXXXX XXXXX | WR E911-00-05 STOP FORMATING  *      DH06D41J
00022 *            |             | THE NAME WHEN '--' IS FOUND.  *      DH06D41J
00023 *            |             |                               *      DH06D41J
00024 *            |             |                               *      DH06D41J
00025 *                                                          *      DH06D41J
00026 ************************************************************      DH06D41J
00027  ENVIRONMENT DIVISION.                                            DH06D41J
00028  DATA DIVISION.                                                   DH06D41J
00029  WORKING-STORAGE SECTION.                                         DH06D41J

错误如下:

DH06D41J.cbl:1: warning: PROGRAM-ID header missing - assumed
DH06D41J.cbl:1: warning: PROCEDURE DIVISION header missing - assumed
DH06D41J.cbl:1: error: syntax error, unexpected Literal
DH06D41J.cbl:1: error: unknown statement '08'
DH06D41J.cbl:2: error: syntax error, unexpected Literal
DH06D41J.cbl:2: error: unknown statement 'DH06D41J'
DH06D41J.cbl:3: error: 'AUTHOR' is a reserved word, but isn't supported
DH06D41J.cbl:3: error: unknown statement 'XXXX'
DH06D41J.cbl:3: error: unknown statement 'LV022'
DH06D41J.cbl:5: error: unknown statement 'THIS'
DH06D41J.cbl:5: error: unknown statement 'DH06D41J'
DH06D41J.cbl:6: error: unknown statement 'DH06D41J'
DH06D41J.cbl:12: error: invalid symbol '|' - skipping word
DH06D41J.cbl:12: error: invalid symbol '|' - skipping word
DH06D41J.cbl:13: error: invalid symbol '|' - skipping word
DH06D41J.cbl:13: error: invalid symbol '|' - skipping word
DH06D41J.cbl:13: error: invalid symbol '\' - skipping word
DH06D41J.cbl:14: error: invalid symbol '|' - skipping word
DH06D41J.cbl:14: error: invalid symbol '|' - skipping word
DH06D41J.cbl:15: error: invalid symbol '|' - skipping word
DH06D41J.cbl:15: error: invalid symbol '|' - skipping word
DH06D41J.cbl:16: error: invalid symbol '|' - skipping word
DH06D41J.cbl:16: error: invalid symbol '|' - skipping word
DH06D41J.cbl:16: error: 'VALID-DATA4' is not defined
DH06D41J.cbl:16: error: '"ZCCL"' is not a numeric value
DH06D41J.cbl:16: error: syntax error, unexpected *
cobol gnucobol
1个回答
0
投票

我想通了 - 我传递了 -free 选项,它不能用于固定格式的输入行!

© www.soinside.com 2019 - 2024. All rights reserved.