AI for Your RPG and COBOL Applications

Top Technology Trends for IBM i Professionals: Part IV

Way back in the early 80s, we used to joke that there was a machine that could write application programs automatically – the problem was it required three meals a day, a salary, and eight hours of sleep each night. We would tell customers that you can’t just say “Do Payroll” to the computer and expect it to start cutting checks. Someone had to write the code. But today, that’s not such a joke. New generative AI systems can make your applications much smarter and even build the application code themselves.

AI can also enhance your applications by providing powerful functions that used to require weeks, months, or longer to code. We have helped companies add interactive mobile functions to their applications using natural language processing and text messaging, eliminating the need to build complex, mobile, or web-based user interfaces. 

Using Generative AI to Increase Development Productivity

I got to experience the productivity of generative AI directly just this past week. I was doing a demonstration for a customer of our new Eradani Assist module for a customer. I used a simple example for my demonstration: I would generate an API that would provide names and addresses from an IBM i database and then use those names and addresses to call an external API and retrieve the latitude and longitude for those addresses. Using generative AI, this demonstration took me about two minutes from start to finish. Later that day, coincidentally, I spoke to a customer who said his business partner had started requiring that he provide latitude and longitude information rather than addresses when calling the partner’s API. He had spent a lot of time coding, debugging, and deploying the code in RPG to get Latitude and Longitude information for all the addresses in his database. So, the same code that I generated and deployed in just two minutes using generative AI took much longer to write by hand.

I started by generating an API that extracted all of the customer records from my IBM I database, and then I gave the AI this prompt:

“The query returns address information for each customer. Use the returned ADDRESS, CITY, STATE, and ZIPCODE fields as input to a call to the geocode.xyz API to get the lat long for those addresses. Use the API key:XXXXXXXXXXXXXXXX. Add the lat long to the returned results.”

From that prompt, the AI engine created the code necessary to get the lat long for the extracted addresses. The code compiled and ran without a hitch.

Of course, anyone who has built real, production-ready APIs knows you need more than an API endpoint to provide a real API: You need the security authentication and authorization code, the data transformation code, the error handling, log, and monitoring code. And, when generating this code using an AI engine, you need to provide the AI engine with guideposts for generating IBM i access code. That is where Eradani Connect comes in. When I generated the API in my demo, I used Eradani Connect with Eradani Assist. In addition to creating the API, Eradani Connect generates the authentication code (eg. JWTs, OAuth2, etc.), the data transformation code, and all the code necessary to access the IBM i.

Using the AI engine, you can continually iterate on the code by giving the engine additional instructions. It will add functions to your API code with each new round of prompts. Using this technique, you can rapidly build highly sophisticated complex functions for your applications.

There is a huge advantage to using generative AI to enhance your applications rather than a low-code solution. With generative AI, you are generating standard code. You will always be free of a coding solution that is limited to the functions provided by the vendor of a low-code tool. Since you can always modify the generated code, you can add any new functions or technology you need.

Adding AI functions to your applications

An IBM i customer approached us to enhance their order entry application with text message order acknowledgments. They initially proposed sending out acknowledgments containing order information and requesting customers to reply “Yes” or “No.” This reply would indicate whether the order details were correct and if the planned delivery date was acceptable. They intended to parse the return data to determine if the answer was yes or no. However, it soon became apparent that customers didn’t always answer “Yes” or “No.” Sometimes, they would answer conversationally with “sounds good” or with a thumbs-up emoji. So, we added a function to send the response to an AI engine to have it determine whether the response was yes or no. We found it could take very complex responses like “At first this looked right to me, but then I noticed that the day you are scheduling for delivery is a company holiday for us, so that date will not work” and determine that the customer was saying “No.”

Once we saw the power of the AI engine in interpreting the customer response, we realized we could add even more capability. We could allow the customer to provide an alternate delivery date, add items to their order, or even change the delivery location using natural language text responses. The text interface could replace the complex mobile web application that previously was used for that process. The texting code could be generated in minutes rather than days, weeks, or months.

Since those early use cases, we have found more and more situations in which Generative AI can quickly enhance existing applications. Generative AI promises to truly modernize your IBM i application development efforts. If you want to explore how Generative AI can help your company improve development productivity and provide exciting new application functions, give us a shout at Eradani. We would be happy to discuss the possibilities with you. You can reach us at www.eradani.com or via email at info@eradani.com.

If you’d like to learn more about this topic, join us for our webinar “Yes i Can”: Modernizing RPG Applications with AI & Real-Time Data Analytics on Wednesday, October 22 at 1 PM CST. Register here.

Get the latest Eradani Blog posts sent to your email.

Facebook
Pinterest
Twitter
XING
LinkedIn
WhatsApp