开发者

How do you call a java program from a COBOL on iSeries V5R4

开发者 https://www.devze.com 2022-12-09 06:28 出处:网络
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 en

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 i开发者_JS百科t 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消