JMP0811I-U 使用 DB2 SQL 编译 Fujitsu COBOL 后出现 Fujitsu 运行时错误:原因/补救措施?
我能够(在 Windows XP 上)预编译、编译和链接包含嵌入式 SQL 的示例 (Fujitsu NetCobol) COBOL 测试程序。 该测试程序用于读取并显示 DB2(Linux 上的 UDB 9.5)数据库表中的行数。
在运行时,我收到以下错误消息:
JMP0811I-U [PID:... TID:...] 'sqlgstrt' 程序的链接规则或参数失败。 PGM=DB2TST1
这个错误所指的预编译源代码如下所示:
* ... in WORKING-STORAGE section:
01 SQLA-PROGRAM-ID.
05 SQL-PART1 pic 9(4) COMP-5 value 172.
05 SQL-PART2 pic X(6) value "AEAMAI".
05 SQL-PART3 pic X(24) value "gBSdTdJY01111 2 ".
05 SQL-PART4 pic 9(4) COMP-5 value 13.
05 SQL-PART5 pic X(13) value "ADMINISTRATOR".
05 SQL-PART6 pic X(115) value LOW-VALUES.
05 SQL-PART7 pic 9(4) COMP-5 value 8.
05 SQL-PART8 pic X(8) value "COBOL/DB".
05 SQL-PART9 pic X(120) value LOW-VALUES.
* .. in PROCEDURE DIVISION:
*EXEC SQL CONNECT TO :DB-SERVER USER :DB-USER USING :DB-PWD
* END-EXEC
CALL "sqlgstrt" USING
BY CONTENT SQLA-PROGRAM-ID
BY VALUE 0
BY REFERENCE SQLCA
有谁知道这个错误消息是什么意思吗?
I'm able to (on Windows XP) precompile, compile and link a sample (Fujitsu NetCobol) COBOL test program which contains embedded SQL. This test program is to read and display the number of rows in a DB2 (UDB 9.5 on Linux) database table.
At runtime I get following error message:
JMP0811I-U [PID:... TID:...] FAILURE IN LINKAGE RULES OR PARAMETER OF THE 'sqlgstrt' PROGRAM. PGM=DB2TST1
The precompile source code this error refers to looks as follows:
* ... in WORKING-STORAGE section:
01 SQLA-PROGRAM-ID.
05 SQL-PART1 pic 9(4) COMP-5 value 172.
05 SQL-PART2 pic X(6) value "AEAMAI".
05 SQL-PART3 pic X(24) value "gBSdTdJY01111 2 ".
05 SQL-PART4 pic 9(4) COMP-5 value 13.
05 SQL-PART5 pic X(13) value "ADMINISTRATOR".
05 SQL-PART6 pic X(115) value LOW-VALUES.
05 SQL-PART7 pic 9(4) COMP-5 value 8.
05 SQL-PART8 pic X(8) value "COBOL/DB".
05 SQL-PART9 pic X(120) value LOW-VALUES.
* .. in PROCEDURE DIVISION:
*EXEC SQL CONNECT TO :DB-SERVER USER :DB-USER USING :DB-PWD
* END-EXEC
CALL "sqlgstrt" USING
BY CONTENT SQLA-PROGRAM-ID
BY VALUE 0
BY REFERENCE SQLCA
Does anybody know what this error message means?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误描述的原因是:
*) CHECK(LINKAGE) 编译器选项
(仅适用于 Windows 的 NetCOBOL,不适用于 Linux)
如果没有此选项,错误仍然存在,但描述性更差
实际错误是由于:
*) DB2 预编译器生成的
CALL "sqlgstrt" USING ...
暗示着错误(= COBOL) 调用约定 => 手动将呼叫更改为
CALL "sqlgstrt" WITH STDCALL LINKAGE USING...
已解决运行时错误该解决方案意味着更改预编译器结果,因此我仍在寻找 DB2 预编译器选项来生成正确的 CALL。
The error description was due to:
*) the CHECK(LINKAGE) compiler option
(only available in NetCOBOL for Windows, not for Linux)
without this option, the error is still there, but even less descriptive
The actual error was due to:
*) the
CALL "sqlgstrt" USING ...
generated by the DB2 precompiler implies the wrong(= COBOL) calling convention => manually changing the calls to
CALL "sqlgstrt" WITH STDCALL LINKAGE USING...
has resolved the runtime errorThis solution implies changing the precompiler results though, so I'm still in search of a DB2 precompiler option to generate the right CALLs.