RPG Program Working With JRuby to Respond to Ajax Request

This Javascript and JRuby code will work with most databases but, in this case, the stored procedure language is RPG. The data retrieved by the RPG program is sent to the web page as JSON. Right now the rendered HTML is pretty ugly because I haven't gotten around to utilizing the CSS.

The button defined in the HTML controls the submission of the AJAX request for JSON which is a GET request processed by the JRuby code. The JRuby calls the RPG program via JDBC.

CAVEATS: The HTML needs a rewrite and the SQL wrapper code is omitted for brevity. You can find the JDBC config yaml file in this earlier post.

Blog Archive