Quickly Add Exciting New Capabilities to Your RPG Applications Using Open Source

DevelopmentOpen Source
Add Capabilities To RPG Using OpenSource

A customer of ours responded to one of my blog posts on APIs and said, “you are missing one of the great benefits of using APIs!” “What would that be?”, I asked. She replied, “The ability to call out to services and open source functions right from our RPG programs! It makes it so easy to add really cool new functions to our core applications. We don’t have to try and break up these big, monolithic RPG applications into components before we can take advantage of open source.” She then went on to describe one of their projects. 

She explained that they kept copies of all the invoices they have issued as pdf documents on a Windows server. If a customer called and asked for a copy of an invoice, their customer service people would have to look up the invoice number on the IBM i through the green screen. Then they need to reenter the invoice number in the Windows system in order to find the correct invoice and send it out. It was a slow process that was prone to errors. They wanted to make it possible to send the invoice directly from the 5250 interface without the manual effort of looking it up in the Windows document archive. The solution to the problem, was to use a simple web service on their Windows machine that would accept an invoice number and email address from the IBM i, retrieve the invoice and then send the document to the customer. It would also return to the IBM i, a confirmation message that the invoice was sent.

With a quick search of the npmjs site, they found that a component for retrieving the invoice from their Windows archive and sending it out had already been written. All they had to do was call it from their IBM i RPG program and give it the email address and invoice number from their DB2 database. The only code they needed to write was a call with parameters to an Eradani Connect RPG program. Eradani Connect took care of calling the web service and translating the parameters to JSON. It also received the confirmation response and translated that back into IBM i parameters. The whole project took a few lines of code and a few hours to develop, test and deliver.

One of the challenges of taking advantage of open source for extending RPG applications is the monolithic nature of many RPG systems. The business logic and the user interface our tightly intertwined and many application functions and business processes are combined in a single program. Trying to call in to a system like that from open source can be difficult. But if you can simply add a call out to open source directly within the program, you can easily add new functionality without the complexity of breaking up the existing code.

Adding new functions using open source means you can take advantage of the millions of open source components that are available as free downloads. It also means that you can start augmenting your application staff with readily available open source engineers. If you want to try this out for yourself, we can help! Just contact us at info@eradani.com or https://eradani.com/contact-us/.

And, if you want to hear some real customer stories of using APIs, check out our virtual panel discussion on IBM i User Innovations and ROI Success Stories on November 10, 2020 at 11 am Pacific / 2:00 Eastern.  Reserve your spot for this informative panel discussion here.

Get the latest Eradani Blog posts sent to your email.

Facebook
Pinterest
Twitter
XING
LinkedIn
WhatsApp