如何从 iSeries V5R4 上的 COBOL 调用 java 程序

发布于 2024-08-08 10:59:54 字数 323 浏览 2 评论 0原文

我的任务是编写一个在 iSeries 平台上运行的例程 - 我将参数(如用户 ID、时间戳等)传递到可以执行 SHA-2 数据加密的程序中。我获取加密结果并将其格式化为字符串以打开浏览器。

我知道如何使用 CLP 打开浏览器,但试图找到一种执行加密的方法。我是否必须编写 Java 程序来处理这个问题?有没有可以编译为 iSeries 并可以从 SQLCBL 或 CLP 调用的东西?

我从未在 iSeries 上编写过 Java 程序/类。让一些 Java pgmrs 在工作中可以提供帮助。只需要知道如何编写 Java 类并在 iseries 上进行编译即可。

想法?提示?建议?

I am tasked with programming a routine that will run on a iSeries platform - where I pass in a parm (like userid, timestamp, etc...) into a program that can perform SHA-2 data encryption. I take the encryption result and format it into a string to open a browser.

I know how to open a browser using a CLP but trying to find a way to perform the encryption. Do I have to code a Java program to handle that? Is there something out there I can compile to iSeries that can be called from a SQLCBL or CLP?

I've never coded a Java program/class on the iSeries. Have some Java pgmrs here at work that can assist with that. Just need to know how to write a Java class and compile on the iseries.

Thoughts? Hints? Suggestions?

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

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

发布评论

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

评论(1

我喜欢麦丽素 2024-08-15 10:59:54

为 iSeries 开发 Java 与其他平台没有什么不同。使用您选择的编辑器在本地开发 Java 类,构建 JAR 并将 JAR 放在 iSeries 文件系统上的某个位置。

您可以使用 JAVA 命令调用 Java 类,您必须在其中提供类/jar 等。请务必提供包含 JAR 的类路径,或者在环境变量中设置类路径。

要从 CLP 或其他 iSeries 程序交换参数,小型 RPG 程序可能有助于转换数据。 RPG 具有本机 Java 支持,我发现这是将 iSeries 程序与 Java 集成的简单方法。 从 RPG 中构建和调用 Java 方法原型一文描述了我使用的解决方案。

Developing Java for an iSeries does not differ from other platforms. Develop the Java classes locally, using your editor of choice, build a JAR and put the JAR somewhere on the iSeries file system.

You invoke a Java class with the JAVA command, where you have to supply the class/jar, etc. Be sure to supply the classpath containing the JAR, or set the classpath in an environment variable.

To exchange parameters from CLP or other iSeries program a small RPG program may be useful to convert the data. RPG has native Java support and I've found this to be an easy way to integrate iSeries programs with Java. The article Prototyping and Calling Java Methods from RPG describes the solution I used.

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