如何解决或开始解决 DB2 问题?
当我尝试预编译包含嵌入式 SQL 语句的 DB2 Cobol 应用程序时,我在 SYSTERM
文件中收到此错误:
********************************* TOP OF DATA **********************************
DSNH527I W DSNHOPTS THE PRECOMPILER OR DB2 COPROCESSOR ATTEMPTED TO USE THE
DSNH004I S DSNHLEXC PROCEDURE DIVISION COULD NOT BE FOUND
DSNH053I W DSNHMAIN NO SQL STATEMENTS WERE FOUND
SOURCE STATISTICS
SOURCE LINES READ: 205
NUMBER OF SYMBOLS: 10
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 1640
THERE WERE 3 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
188712 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.
RETURN CODE IS 12
******************************** BOTTOM OF DATA ********************************
我认为错误是它找不到 procedure Division 部分,但是它在这里的代码中:
*---------------------------------------------------------------*
* P R O C E D U R E D I V I S I O N *
*---------------------------------------------------------------*
PROCEDURE DIVISION USING LK-TRANS-INPUT.
000-MAIN.
When I try to pre-compile my DB2 Cobol application that contains embedded SQL statements, I get this error in my SYSTERM
file:
********************************* TOP OF DATA **********************************
DSNH527I W DSNHOPTS THE PRECOMPILER OR DB2 COPROCESSOR ATTEMPTED TO USE THE
DSNH004I S DSNHLEXC PROCEDURE DIVISION COULD NOT BE FOUND
DSNH053I W DSNHMAIN NO SQL STATEMENTS WERE FOUND
SOURCE STATISTICS
SOURCE LINES READ: 205
NUMBER OF SYMBOLS: 10
SYMBOL TABLE BYTES EXCLUDING ATTRIBUTES: 1640
THERE WERE 3 MESSAGES FOR THIS PROGRAM.
THERE WERE 0 MESSAGES SUPPRESSED BY THE FLAG OPTION.
188712 BYTES OF STORAGE WERE USED BY THE PRECOMPILER.
RETURN CODE IS 12
******************************** BOTTOM OF DATA ********************************
I think the error is that it can't find the Procedure Division section, but it is in the code here:
*---------------------------------------------------------------*
* P R O C E D U R E D I V I S I O N *
*---------------------------------------------------------------*
PROCEDURE DIVISION USING LK-TRANS-INPUT.
000-MAIN.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看示例代码,您似乎从第 1 列开始编码。
传统大型机编译器期望在特定列中编写代码:
Looking at the sample code it looks like you start coding in column 1.
Trad mainframe compilers expect code in particular columns:
我通过在 DB2 大型机上使用相同的数据重新创建数据集来修复此问题。他们的设置参数有问题。
I fixed it by recreating the Datasets on the DB2 mainframe with the same data in them. There was something wrong with their setup parameters.