Eradani Brings COBOL Into Its Microservices World
January 19, 2022 Alex Woodie
IBM i customers who need to connect their COBOL applications to Web services and APIs may want to check out Eradani, which is in the process of rolling out an update aimed at COBOL code. In the process of updating Eradani Connect, the company strengthened its entire platform, which will benefit RPG shops, too.
Eradani Connect was designed to make it easy to connect IBM i applications to external APIs in a bi-directional manner. With its native wrap-around code for IBM i, the software allows customers to expose their existing applications using REST protocols and JSON data structures, thereby providing a new way to communicate with customers and partners over the Internet. Conversely, the software also helps IBM i shops consume externally developed APIs using these same technologies, potentially improving internal applications with additional data feeds.
Up to this point, Eradani has been primarily focused on helping IBM i shops publish and consume data using RPG applications. Considering that the majority of IBM i applications are written in RPG, this was a good decision. But recently, the company has had several potential clients come out of the woodwork to ask if Eradani Connect could work with their COBOL applications.
“Suddenly now we’re getting all these requests” for COBOL support, says Dan Magid, the founder and CEO of the Berkeley, California, company. “They came to us saying, hey, we really need to do this. There are no good tools out there. Can you handle it?”
After calling around and finding there was substantial support for a COBOL version of the product, Magid and company decided to take these potential clients up on their request. But instead of doing a one-off, custom effort to support these new customers, Eradani would do the more difficult work to integrate COBOL support directly into the product.
At first, working with COBOL was a challenge, as the company and its engineers had no experience with the language, which is often used to code programs on the IBM System z mainframe. The procedural language behaves substantially different on IBM i than RPG, which they were very familiar with, so there was a substantial learning curve to get up to speed on COBOL.
“When we went into it, we didn’t actually know how different COBOL is from RPG, so we learned there were a lot of things we had to do,” Magid tells IT Jungle. “We are now much more experienced.”
For Eradani CTO Dave Romo, who has nearly a quarter of a century experience on the platform, the process of adding COBOL support provided the opportunity to expand his knowledge of IBM i development. “I’ve been writing a lot of COBOL programs,” Romo says. “I know it fairly well now.”
Eradani started the COBOL work in 2021, and in September the company shipped Eradani Connect version 4.1, which brought some COBOL support to the product. With the current version 4.2 release, the company has expanded its support of COBOL.
One of the new features in version 4.2 is the ability to automatically generate COBOL code from API descriptions, like Open API and Swagger documentation. By generating the YAML code automatically, Eradani will help to eliminate common errors that occur when building these connections by hand, such as misspellings, not writing something in CamelCase, or the use of a minus sign (which is used to separate variable names in COBOL, but which connotes a subtraction function in other languages).
“In RPG right now, you hand code this file that’s written in YAML to describe the way that the RPG data structure looks,” Magid says. “But for COBOL, we can automatically just generate that YAML file [from COBOL data structures]. And then from that YAML file, we can then generate the TypeSript or the JSON object and also the conversion functions, the functions that convert the COBOL record into a JSON object.”
The YAML code generator makes the COBOL version of Eradani Connect more advanced than the RPG version at the moment, although the RPG version will soon get that feature too, Romo says. “It’s actually a little bit ahead of what we can provide for RPG shops since we can now scan a COBOL copy block and generate the TypeScript from that,” he says.
As a “universal translation layer,” the YAML generator also will make it easier for Eradani to onboard additional languages in the future, Magid says.
Some of the particulars of the COBOL language on IBM i took some getting used to, Romo says. For example, working with REDEFINES in COBOL was similar but different than working with an RPG overlay, he says.
“It’s the same kind of concept,” he says. “But you don’t tell it where exactly to put things. . . . Because everything is nested in COBOL, it knows where to put everything, it knows where it fits.”
Most of the clients that are asking for COBOL support are in the finance world. Many of these customers moved off the mainframe to IBM i, bringing their COBOL applications with them, Magid says. Much of the IBM i implementation of COBOL is borrowed from the mainframe world, says Romo, who consulted IBM’s mainframe COBOL resources to get up to speed on COBOL for IBM i.
Eradani also tapped its business partner, Cothern Computer Systems, to help with the transition. Cothern is an expert in migrating COBOL applications to the IBM i platform, and assisted Eradani with its effort.