I want to find away to call a RPG Function from Java. I must be able to pass in parameters and to return result sets, and output parameters.
I was able to find this but it is using a stored procedure. Not the way I want to go. I also found this question Invoking AS400 RPG From Java they talking about JTOpen. Still trying to look for tutorials to see if JTOpen could help me, but have not found any yet.
If you can please help me to find a way to call RPG functions from Java, I would appreciated that.
Everything is explained in the IBM Toolbox for Java (JTOpen) Programmer's Guide.
Specifically the ProgramCall class will allow you to call an HLL from Java.
From V5R2 version there is IBM Toolbox for Java (JTOpen is Open Source Version but you can find all jars needed in /QIBM/ProdJava/OS400/jt400/lib jt400.jar and jt400native.jar). Look at this link http://www.mysamplecode.com/2011/07/call-rpgle-from-java-using-package.html there's a good example for calling an rpg object from java passing parameters ...
Bye Depe
来源:https://stackoverflow.com/questions/16693448/call-rpg-function-from-java