Z/OS COBOL V6调用DLL

发布于 2025-01-18 04:36:13 字数 1143 浏览 4 评论 0原文

我主要是一名 C 开发人员。我有一个示例 COBOL 驱动程序,它在 z/OS 中调用我的 C DLL。

当我们使用预链接器和 IMPORT 语句在 DLL 内定义 API 时,COBOL 驱动程序在 z/OS COBOL V4 中工作正常。

对于 COBOL V6(和 V5),不再支持预链接器(以及大量其他更改)。

如何让 COBOL 识别我的 IMPORT 语句以了解 DLL 内的 LONGMIXED API?

COBOL 调用如下所示:

CALL
  'PBFNTerminate' USING
                    BY VALUE NULL-POINTER,

我的 COBOL 程序是使用 RENT,DLL​​,PGMN(LM) 编译的。

我尝试简单地将 DLL 创建中的 IMPORT 语句包含在 BINDER 中,但它们似乎被忽略了。我有 DYNAM(DLL),CALL 作为 BINDER 参数,但我仍然得到:

IEW2456E 9207 SYMBOL PBFNTerminate UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.

如果我使用 DYNAM(DLL),NCAL 运行 BINDER,我得到

IEW2454W 9203 SYMBOL PBFNTerminate UNRESOLVED.  NO AUTOCALL (NCAL) SPECIFIED.  NAME SPACE = 3

然后是 S0C1我试着跑。 我认为我缺少一个步骤或参数,但显然我不知道它是什么。

附带评论,COBOL INTERLANGUAGE COMMUNICATIONS 指南似乎是在 COBOL V5 和 V6 之前编写的: https://www.ibm.com/docs/en/cobol-zos/4.2?topic=answers-interlanguage-communication

I am primarily a C developer. I have a sample COBOL driver that calls my C DLL in z/OS.

The COBOL driver was working fine in z/OS COBOL V4 when we used the Pre-Linker and IMPORT statements to define the API’s inside the DLL.

With COBOL V6 (and V5), the pre-linker is no longer supported (along with a myriad of other changes).

How can I get COBOL to recognize my IMPORT statements to know about the LONGMIXED API’s inside my DLL?

The COBOL call looks like:

CALL
  'PBFNTerminate' USING
                    BY VALUE NULL-POINTER,

My COBOL program is compiled with RENT,DLL,PGMN(LM).

I tried to simply include the IMPORT statements from the DLL creation in the BINDER but they seem to be ignored. I have DYNAM(DLL),CALL as a BINDER parameter but I still get:

IEW2456E 9207 SYMBOL PBFNTerminate UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE DESIGNATED CALL LIBRARY.

If I run the BINDER with DYNAM(DLL),NCAL I get

IEW2454W 9203 SYMBOL PBFNTerminate UNRESOLVED.  NO AUTOCALL (NCAL) SPECIFIED.  NAME SPACE = 3

And then a S0C1 when I try to run.
I’m thinking there is a step or parameter I’m missing but obviously I don’t know what it is.

Side comment, the COBOL INTERLANGUAGE COMMUNICATIONS guide seems to be written pre COBOL V5 and V6: https://www.ibm.com/docs/en/cobol-zos/4.2?topic=answers-interlanguage-communication

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤檠 2025-01-25 04:36:13

发现问题了。至少对我来说,PLKED 步骤默认为 NOUPCASE。在 Binder 中,我必须将 CASE(MIXED) 添加到 PARM 中。最终的解决方案是:PGM=HEWL,PARM='DYNAM(DLL),CASE(MIXED)'

Found the problem. At least for me, the PLKED step defaulted NOUPCASE. In the Binder I had to add CASE(MIXED) to the PARM. The the final solution was: PGM=HEWL,PARM='DYNAM(DLL),CASE(MIXED)'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文