JRuby Executes AS400 RPG Program Stored Procedure

The code below includes a simple JRuby program that connects to an AS400 and executes an RPG program. Code and detailed instructions are below.

After compiling the RPG and creating the stored procedure, run the Sinatra program by entering jruby as400sp.rb in the PC's command terminal window.

The as400sp.rb JRuby program will run on the PC and connect to the AS400 and execute the RPG program (stored procedure).

Verify using a browser by entering the URL:
http://localhost:4567/capitalize?first=George&last=Jetson

The URL and parameters will return a JSON response
{"name":{"first":"GEORGE","last":"JETSON"}}



Blog Archive