gpt4 book ai didi

从 Cobol 程序调用 C 函数

转载 作者:太空宇宙 更新时间:2023-11-04 04:56:11 25 4
gpt4 key购买 nike

我们有一个共享库,它具有网络服务客户端的功能。客户端是使用 gsoap 创建的,旧版 progress 4GL 应用程序使用此客户端来使用加密 Web 服务。

现在我被问到是否可以用其他用 Cobol 编写的遗留系统使用相同的机制。

那么,如果我有这个共享库,Cobol 程序可以调用这个库中的函数吗?

如果可能,任何人都可以分享引用文档的示例吗?

最佳答案

如果您使用的是 Micro Focus COBOL 产品,然后查看 C 示例,我希望您单独执行以下操作:

1) 对“soapH.h”执行 h2cpy 以获得“soaph.cpy”2) 然后....

    01 ws-soap  soap.

call "soap_init" using
by reference ws-soap
end-call


call "soap_call_ns1__...." using
by reference ws-soap
by value omitted *> endpoint address
by value omitted *> soapAcition
.... your parameters
end-call

if return-code not equals SOAP-OK
call "soap_pint_fault" using
else
...
end-if

call "soap_destroy" using
by reference ws-soap
end-call

call "soap_end" using
by reference ws-soap
end-call

call "soap_done" using
by reference ws-soap
end-call

关于从 Cobol 程序调用 C 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7678045/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com