2

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.

Community
  • 1
  • 1
ZioN
  • 550
  • 2
  • 11
  • 35

2 Answers2

2

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.

James Allman
  • 40,573
  • 11
  • 57
  • 70
  • Funny enough I found this link, but for some reason it would not load the page, but it seems to be working now. Will have a look, thanks. – ZioN May 22 '13 at 13:52
  • Yes this is what I was looking for, I am having a few issues with the testing code, but I'll ask that in another question. – ZioN May 23 '13 at 06:35
1

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