IBM Watsonx to use generative AI to translate COBOL code into Java

The product is targeted at modernizing mainframe applications that run on IBM Z systems, as the number of COBOL developers starts to dwindle.

Clockready (CC BY-SA 3.0)

In a bid to help IBM Z systems customers modernize their applications, IBM is expanding the abilities of its generative AI based Watson Code Assistant to include COBOL code translation into Java. 

Big Blue claims that the introduction of the new capability is expected to counter the dwindling numbers of COBOL-proficient developers and challenges currently faced in the accelerated development of applications for mainframe systems.

Based on the IBM Code Assistant that was previewed in May, the new product, dubbed Watsonx Code Assistant for Z, uses Watsonx.ai’s code foundational model to generate new Java code to run on the Z operating system.

“Watsonx Code Assistant for Z is being engineered to feature automated code refactoring capabilities that can extract business services from a monolithic COBOL application,” an IBM spokesperson said in a demo video.  

Code refactoring is the process of converting code into a new programming language without changing its nature, behavior, or output.

Before refactoring the code, developers will have to use the application discovery and delivery intelligence tool (ADDI), which is currently under development, to understand the target application dependencies and generate a metadata repository, IBM said.

A separate IBM tool has to be used to open the workbook and extract the COBOL code for a particular business service before being converted to Java, the company added.  

“The current prototype from Watsonx Code Assistant for Z analyses both the COBOL code and the data structures of the extracted business service to generate the Java classes,” the spokesperson said.

Once the Java code is generated, the output can be compared with the output of the COBOL code before deployment, IBM said, adding that a developer can enhance or modify the new code at any point during the process.

Tools including ADDI will be offered with the new Watsonx Code Assistant for Z when it will be made generally available later this year with additional capabilities, the spokesperson said.

IBM is already working on using the Watson Code Assistant for generating content for its Red Hat Ansible Automation Platform.

This is expected to enable developers to write Ansible Playbooks with AI-generated recommendations, it said.