Getty Images/iStockphoto
COBOL application modernization tools and techniques
COBOL code modernization options range from a simple, yet expensive, application re-write to automated tools that can convert code and extract business rules.
A shortage of COBOL developers means many enterprises are modernizing their mainframe apps to access a larger pool of software developers.
But while there are many approaches to COBOL code conversions, line-by-line conversions are never a good idea, said Jason Bloomberg, founder and president at analyst firm Intellyx. He gave Java as an example.
"Java follows different patterns and different best practices than COBOL, so you don't want to translate it line by line," he said.
In addition to line-by-line COBOL conversions, developers have the option to rewrite an application from scratch or use an automated code conversion tool, but each comes with pros and cons, according to industry experts. Which path to take to COBOL code modernization is a function of factors such as available skills, budget constraints and suitability of an off-the-shelf product.
Start from scratch
One of the best options is to rewrite the application for the modern stack, said Chris Riley, senior manager of developer relations at marketing tech firm HubSpot. Rewriting a legacy application is often the method of choice if the application needs to be repurposed or if the business logic is obsolete and an off-the-shelf alternative isn't available.
"It avoids inevitable technical debt and allows you to fully leverage the benefits of the new stack," he said.
But this type of undertaking can be expensive, Riley said. A complete application rewrite is time-consuming and involves many months or years of development time. In addition, a complete rewrite usually requires developers to translate COBOL into another programming language, which could be a challenge due to the developer shortage.
Automated COBOL code conversion
Sometimes a complete rewrite is unavoidable, as in the case of an application with defunct business logic. But if that's not the case, automated tools are the way to go, Bloomberg said.
There are two different paths to automate the modernization of COBOL applications: code conversion from legacy to modern code with tools such as CloudFrame or Synchrony Systems or business rule extraction with EvolveWare's Intellisys.
CloudFrame is fully automated and uses machine learning to generate cloud-native Java code. Synchrony Systems is partially automated, which means the modernization initiative is supported by people, Bloomberg said. Consultants such as a systems integrator or Tata Consultancy Services can assist with everything from planning a migration to completing an entire migration project.
Another option is Intellisys, a tool that not only converts legacy code to modern code but also extracts business rules from source code.
Business rule extraction makes Intellisys unique in the code conversion tools market, but enterprises must consider more than just migrating business rules, Bloomberg said.
He gave the following example: "A COBOL application is likely to have a mainframe user interface and that's not what you want to replicate in the modernized application."
While extracted business rules sum up an application's purpose, they don't contain everything an application needs to run. To get functionality -- such as a user interface -- the rules must either be taken to a modern off-the-shelf product or used to write an application from scratch in a modern language.
The easiest and fastest way to modernize using business rules extraction is to find an off-the-shelf product that replicates the functions of the old COBOL application, which would include a modern interface, said MitenMarfatia, CEO of EvolveWare. The extracted business rules can then be exported to that off-the-shelf platform, he said.
But automation isn't a silver bullet. Even if automated code conversion is successful, the result won't be a perfect new application, Riley said. While it is possible to have an apples-to-apples runnable application with automated code conversions, it would not be optimized for that language and its runtime environment, he said.
"The modern language is going to have new tricks, and there is no way to translate old code into those new tricks," he said.
Therefore, to fully take advantage of the language's abilities, developers must intervene in the translation. "The problem is one small thing, such as better garbage collection, could force you to refactor every function in a small way," Riley said.
Modular or phased approach
A modular or phased approach, which can be applied with or without automation, can make the daunting COBOL code modernization challenge more approachable.
Jason BloombergAnalyst, Intellyx
If the old application is modular, enterprises can modernize parts of it and integrate the old parts with the new parts via APIs to keep the application working during the modernization process, Bloomberg said.
A good candidate for the modular approach is an insurance claims processing company's mainframe application. That has multiple parts, such as claims processing, adjusting or underwriting -- and these can be modernized one at a time, he said.
Miten suggested another phased approach, which is used as a steppingstone to modernization rather than a complete path.
"Once you break that up into small modules, understand what you have, then decide which way you want to go in terms of modernization and then implement," he said.