在 AS/400 中编译 COBOL 时出错:由于源语句,程序 PROGRAM 未在库 TEST1 中创建
当我尝试以 PUB400.COM IBM i 系列免费托管的成员身份编译 cobol 程序时,出现错误。
我遵循与此视频中描述的示例相同的示例:
编译时,我收到此错误消息:
由于源语句,程序 USOVAR 未在库 TEST1 中创建 +
但我不知道如何获取有关该消息的更多信息以及如何获取日志错误或调试尚未编译的成员。
这是代码:
*************** Beginning of data *************************************
0001.00 IDENTIFICATION DIVISION.
0002.00 PROGRAM-ID. USOVAR
0003.00 AUTHOR. REINALDO ENRIQUE URQUIJO YANIEZ.
0004.00 DATE-WRITTEN. 24/03/2022.
0005.00 ENVIRONMENT DIVISION.
0006.00 DATA DIVISION.
0007.00 WORKING-STORAGE SECTION.
0008.00 77 WKS-NOMBRE PIC A(30).
0009.00 01 WKS-REGISTRO-EMPLEADO.
0010.00 02 WKS-NOM-EMP.
0011.00 03 WKS-NOMBRE-TRAB PIC A(20)
0012.00 VALUE "PEDRO".
0013.00 03 WKS-APELLIDO-PATERNO PIC A(20)
0014.00 VALUE "PEREZ".
0015.00 03 WKS-APELLIDO-MATERNO PIC A(20)
0016.00 VALUE "ROJAS".
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0017.00 02 WKS-EDAD PIC 9(02)
0018.00 VALUE 48.
0019.00 02 WKS-SALARIO PIC 9(05)V99
0020.00 VALUE 788.22.
0021.00 66 WKS-APELLIDOS-TRAB RENAMES
0022.00 WKS-APELLIDO-PATERNO THRU WKS-APELLIDO-MATERNO.
0023.00 01 WKS-BANDERA PIC 9(01).
0024.00 88 WKS-TRUE VALUE 1.
0025.00 88 WKS-FALSE VALUE 0.
0026.00 77 GASTOS PIC 9(05)V99.
0027.00 77 WS-HORAS PIC 9(10).
0028.00 01 WKS-DIRECCION PIC X(30)
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0029.00 VALUE "AV SIEMPRE VIVA 123".
0030.00 PROCEDURE DIVISION.
0031.00 00001-PRIMER-SECCION SECTION.
0032.00 00001-MIPARRAFO.
0033.00 DISPLAY "BIENVENIDO AL PROGRAMA".
0034.00 DISPLAY "PROGRAMA DE VARIABLES"
0035.00 ACCEPT WKS-NOMBRE.
0036.00 DISPLAY "HOLA," WKS-NOMBRE.
0037.00 DISPLAY "REGISTRO EMPLEADO: " WKS-REGISTRO-EMPLEADO.
0038.00 DISPLAY "EDAD: " WKS-EDAD.
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0039.00 DISPLAY "NOMBRE: " WKS-NOM-TRAB.
0040.00 DISPLAY "APELLIDOS: " WKS-APELLIDOS-TRAB.
0041.00 DISPLAY "DIRECCION: " WKS-DIRECCION.
0042.00 DISPLAY "GASTOS: " WKS-GASTOS.
0043.00 DISPLAY "BANDERA: " WKS-BANDERA.
0044.00 STOP "PAUSA".
0045.00 STOP RUN.
****************** End of data ****************************************
I get an error when I'm trying to compile a cobol program as a member in the PUB400.COM IBM i Series free hosting.
I follow an example same as descripted in this video:
When compile, I get this error message:
Program USOVAR not create in library TEST1 because of source statement +
But I don't know how to get more information about the message and how to get the log error or debug a member that is not compiled yet.
This is the code:
*************** Beginning of data *************************************
0001.00 IDENTIFICATION DIVISION.
0002.00 PROGRAM-ID. USOVAR
0003.00 AUTHOR. REINALDO ENRIQUE URQUIJO YANIEZ.
0004.00 DATE-WRITTEN. 24/03/2022.
0005.00 ENVIRONMENT DIVISION.
0006.00 DATA DIVISION.
0007.00 WORKING-STORAGE SECTION.
0008.00 77 WKS-NOMBRE PIC A(30).
0009.00 01 WKS-REGISTRO-EMPLEADO.
0010.00 02 WKS-NOM-EMP.
0011.00 03 WKS-NOMBRE-TRAB PIC A(20)
0012.00 VALUE "PEDRO".
0013.00 03 WKS-APELLIDO-PATERNO PIC A(20)
0014.00 VALUE "PEREZ".
0015.00 03 WKS-APELLIDO-MATERNO PIC A(20)
0016.00 VALUE "ROJAS".
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0017.00 02 WKS-EDAD PIC 9(02)
0018.00 VALUE 48.
0019.00 02 WKS-SALARIO PIC 9(05)V99
0020.00 VALUE 788.22.
0021.00 66 WKS-APELLIDOS-TRAB RENAMES
0022.00 WKS-APELLIDO-PATERNO THRU WKS-APELLIDO-MATERNO.
0023.00 01 WKS-BANDERA PIC 9(01).
0024.00 88 WKS-TRUE VALUE 1.
0025.00 88 WKS-FALSE VALUE 0.
0026.00 77 GASTOS PIC 9(05)V99.
0027.00 77 WS-HORAS PIC 9(10).
0028.00 01 WKS-DIRECCION PIC X(30)
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0029.00 VALUE "AV SIEMPRE VIVA 123".
0030.00 PROCEDURE DIVISION.
0031.00 00001-PRIMER-SECCION SECTION.
0032.00 00001-MIPARRAFO.
0033.00 DISPLAY "BIENVENIDO AL PROGRAMA".
0034.00 DISPLAY "PROGRAMA DE VARIABLES"
0035.00 ACCEPT WKS-NOMBRE.
0036.00 DISPLAY "HOLA," WKS-NOMBRE.
0037.00 DISPLAY "REGISTRO EMPLEADO: " WKS-REGISTRO-EMPLEADO.
0038.00 DISPLAY "EDAD: " WKS-EDAD.
FMT CB ......-A+++B+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0039.00 DISPLAY "NOMBRE: " WKS-NOM-TRAB.
0040.00 DISPLAY "APELLIDOS: " WKS-APELLIDOS-TRAB.
0041.00 DISPLAY "DIRECCION: " WKS-DIRECCION.
0042.00 DISPLAY "GASTOS: " WKS-GASTOS.
0043.00 DISPLAY "BANDERA: " WKS-BANDERA.
0044.00 STOP "PAUSA".
0045.00 STOP RUN.
****************** End of data ****************************************
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我根据您的代码创建了一个名为 TEST0017CB 的源成员。 Srctype CBLLE。
使用 PDM 中的选项 14 编译代码。 CRTBNDCBL
编译失败。运行 WRKJOB 命令。选项 4. 假脱机文件。编译输出列表是列表中的最后一个假脱机文件。使用选项 5 显示编译列表。
纠正了这些编译错误的
源代码:
I created a source member from your code named TEST0017CB. Srctype CBLLE.
Compiled the code using option 14 in PDM. CRTBNDCBL
The compile failed. Ran WRKJOB command. Option 4. spooled files. The compile output listing is the last spooled file in the list. Use option 5 to display the compile listing.
got these compile errors
corrected the source code: