This is a cache of https://developer.ibm.com/articles/mainframe-app-modernization-interoperability/. It is a snapshot of the page as it appeared on 2025-11-14T13:02:03.782+0000.
Accelerate Mainframe application modernization with Generative AI and COBOL Java interoperability - IBM Developer
Mainframe applications have supported enterprise operations for decades. Many of them are monolithic, poorly documented, and depend on knowledge held by a shrinking group of experts. Modernizing these applications on the mainframe by modularizing code, improving documentation, and enabling integration helps preserve reliability, performance, and security while also reducing risk and increasing agility.
Incremental modernization means refactoring monolithic applications in small, manageable phases instead of attempting a complete transformation at once. This approach preserves core business logic and data integrity while gradually breaking the application into business services, using the best technology for each service.
Key benefits:
Reduced Risk – Smaller, step-by-step changes lower the chance of major failures.
Business Continuity – Critical operations stay functional during the process.
Cost Management – Investments are spread over time instead of requiring large upfront expenses.
Skill Leverage – Existing mainframe expertise is combined with modern development practices.
Incremental modernization with IBM watsonx Code Assistant for Z
IBM watsonx Code Assistant for Z is a developer assistant that supports the entire application modernization lifecycle using generative AI and automation.
The phases of watsonx Code Assistant for Z include:
watsonx Code Assistant for Z is built to support incremental modernization by selectively updating parts of a monolithic COBOL application based on technical needs and business priorities. watsonx Code Assistant for Z enables:
Automated refactoring of a business function into a modular COBOL service.
Optional transformation of the COBOL service to Java if it is the best fit.
Use of COBOL/Java interoperability on z/OS so that services can interact with each other.
The following figure shows how incremental modernization can use a best-fit technology approach with watsonx Code Assistant for Z.
With this approach, it is important to have a simple method for COBOL and Java services to interact with each other.
Using COBOL/Java interoperability in Enterprise COBOL for z/OS
Enterprise COBOL for z/OS version 6.4, and later provides simplified COBOL/Java interoperability. It works without major changes to COBOL programs and does not require object-oriented COBOL.
Key features:
Call COBOL from Java
The JAVA-CALLABLE directive makes an existing COBOL program callable from Java.
Figure: COBOL program with the JAVA-CALLABLE directive
Parameters, such as Employee Role ID and Employee Role, are automatically converted between COBOL and Java formats.
Figure: Java code calling the COBOL program with optional parameters
Share COBOL data with Java
Enterprise COBOL version 6.4, and later provides the JAVA-SHAREABLE directive to make selected WORKING-STORAGE data items accessible to Java applications. These items can be read and updated directly from Java.
Figure: COBOL program with WORKING-STORAGE items marked as JAVA-SHAREABLE
Figure: Java code that reads and writes those data items
Call Java Methods from COBOL
Enterprise COBOL version 6.4, and later provides an enhanced CALL statement that allows a COBOL program to call a static Java method. Parameters can be passed, and they are automatically converted between COBOL and Java formats.
Figure: COBOL program calling a static Java method
Enterprises can speed up mainframe application modernization by taking an incremental approach. Using the generative AI features of IBM watsonx Code Assistant for Z together with the COBOL/Java interoperability in Enterprise COBOL for z/OS helps achieve this while keeping systems reliable and secure.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.