IBM Introduces AI-Powered Code Assistant to Modernize Legacy COBOL
IBM is utilizing the power of artificial intelligence (AI) to breathe new life into legacy COBOL code. With hundreds of billions of lines of COBOL code still running on production systems globally, there is a pressing need to modernize this language, which is over 60 years old and primarily developed by retired or deceased architects.
While IBM previously attempted to have humans rewrite the code in Java, the company is now turning to AI to assist in the process. The newly unveiled IBM Watsonx Code Assistant aims to keep humans involved by employing generative AI to analyze, refactor, and test the new object-oriented code. IBM assures that code generated by Watsonx will be interoperable with COBOL and certain Z mainframe functions.
Recognizing that the challenges of COBOL lie not only in the code itself but also in the business logic, edge cases, and institutional memory, IBM’s CTO for zSystems software, Kyle Charlet, highlights the difficulty many organizations face in modernizing their COBOL code. Despite investing years and millions of dollars, only a fraction of the code has been successfully updated. The process of rewriting COBOL is labor-intensive and time-consuming, with varying results from different approaches.
IBM believes that its Watsonx AI can help large organizations decouple individual services from monolithic COBOL applications. The company envisions a three-step process: refactoring, where individual services are surgically separated from larger code; transformation, either into mainframe-friendly Java code or COBOL that can directly interact with Java; and validation, with AI assisting in creating test cases while developers maintain control.
The integration of AI into the COBOL modernization process presents an opportunity to address the challenges of updating and extending COBOL codebases, which can be stable and secure but costly to maintain. Outdated COBOL was cited as a contributing factor in the Office of Personnel Management’s data breach in 2015 when the code couldn’t be encrypted or integrated with secure systems.
However, it is worth considering that COBOL excels at managing business-specific systems and interactions that potentially present fewer attack vectors. Critics argue that while AI-generated and restructured code may appear correct and ready for testing, the absence of experienced programmers familiar with the intricacies of the code could result in unintended consequences and errors.
IBM’s watsonx Code Assistant for Z will first be deployed for Red Hat Ansible Light speed. Given that watsonx.ai was trained on more than 100 coding languages, it is likely that more AI co-pilots for old mainframe code will follow suit.
With its AI-powered Code Assistant, IBM aims to reshape legacy COBOL code, making it more modular and compatible with contemporary systems. By combining the strengths of generative AI and human expertise, the goal is to streamline the modernization process and ensure the longevity of COBOL applications.