You are currently on IBM Systems Media’s archival website. Click here to view our new website.


There’s an RPG App For That!

Score big with open-source tools

Score big with open-source tools

At our recent local TUG TEC User Group conference, Jon was asked to present a couple of sessions on open source for the IBM i. One focused on PHP-based options (SugarCRM and Mantis/400 among others). The other session focused on RPG-based offerings. While fewer and tending to focus on the tools arena, nevertheless the number of offerings is growing. We’ve mentioned many in previous articles and blogs, but hopefully you’ll find this "one-stop shopping" source useful—particularly if you’re one of the unfortunate few who don't read our blog!

We included several of the offerings from Jon's session in last month's EXTRA, which focused on Web-enablement tooling. So since there’s a growing interest in "free” software, it seemed appropriate to cover some more of the field in this month's column. Not all of the offerings we’ll cover are open source in the conventional sense of the word, but they’re all offered free of charge and the vast majority come complete with source code, so you can modify them to meet your needs. Indeed, several are intended purely as "how-to" examples and don’t offer any innate functionality beyond that.

So, what kinds of topics will we cover? Well ... exactly what do you want to do? Consume Web services? Send email from your RPG programs? Use RPG to process the content of received emails? Create, update and read business documents such as spreadsheets, graphs, charts and reports? Generate and process XML? Transform XML into database and database into XML? Invoke PC applications from green screens? In all of these cases we can tell you, "There's an RPG App for that!"

Perhaps your need is more of a "How do I ...?" do things such as use system APIs, or C-style functions or other common programming tasks. "There's a web site for that!"

Consuming Web Services

How about consuming Web services from RPG. Our first recommendation is to ignore, at least in its current implementation, IBM's Web Services Client. Its sibling, the Web Services Server tooling is excellent and, once you get the hang of it, very easy to use and deploy. But the client portion isn’t as straightforward and requires that you have the C compiler installed. It’s also not as well supported by examples and the user community as the pure RPG-based alternative, Scott Klement's HTTP API. Scott's tool is a free open-source offering that’s easy to use and has a very supportive user community. The example programs are excellent and backed up by many magazine articles that lead you step by step through the process.

Like all good tools, HTTP API has encouraged others to build on it. The most prominent of which is Thomas Raddatz’s WSDL2RPG. Thomas' tool takes as input the WSDL file that defines the Web service you want to consume, and generates all of the necessary calls to Scott's APIs to interact with that service. Not only that, but to enable you to test that the generated service program works as desired, WSDL2RPG will optionally generated a test program for you. Any easier and it would all write itself!

Jon Paris is a technical editor with IBM Systems Magazine and co-owner of Partner400.

Susan Gantner is a technical editor with IBM Systems Magazine and co-owner of Partner400.



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

New and Improved XML-INTO

Namespace support makes the opcode a viable option

Authenticating on the Web

The finer points of OpenRPGUI, Part 1

The Microphone is Open

Add your voice: Should IBM i include open-source RPG tools?

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters