tags:

views:

253

answers:

1

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?

+1  A: 

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.

Kwebble