Harnessing the Power of Java on Z Mainframe: Advantages and Relevance in the Era of Watson Code Assistant for Z
Introduction
Today, April 7th, is the 60th birth anniversary of the mainframe, a significant milestone in the history of computing. This occasion emphasizes its enduring legacy characterized by reliability, scalability, and innovation, serving as the backbone of critical business operations for over six decades and still going strong.
Java on Z has become a topic of discussion, especially with the introduction of Watson Code Assistant for Z, IBM’s GenAI offering that converts Cobol to Java for Mainframe use. The obvious question arises: why run Java on Mainframe at all? In this blog post, we’ll delve into this question and provide insights into the benefits and relevance of leveraging Java on Mainframe systems.
IBM z and Java
Java support for z has been there for almost 3 decades, and the solution has evolved over the time. The Java solutions for z/OS offer the same full-featured Java APIs as those found on all other platforms. Additionally, the Java programs for z/OS have been enhanced to give Java access to the distinctive database, file systems used by z/OS (DB2, VSAM etc.). Interfaces for Java programs are provided by programming languages like COBOL and PL/I in the z/OS operating system.
Why run Java on z
In many aspects z is the best suited platform to run Java applications. Below are benefits of running Java on z.
1. Bring Code to Data, most corporate data resides on the mainframe. Colocation of code (core logic) and data helps improve the performance of applications.
2. Build new applications on Z with Java, Z provides Java with full API support and access to z/OS data. Re-use existing Cobol business logic by calling the Cobol program from Java. Cobol 6.4 makes interoperability between Cobol and Java easier.
3. Support of common toolsets for the development of Java on Z Leverage existing Java staff to work on Z.
4. Lower cost to run Java on Mainframe; Java workloads are 100% zIIP eligible.
5. Improved performance. Execution speed of Java on z is on par with that of Cobol, which is close to machine code level and efficient garbage collection on z.
z Features best suited for Java
We will see how it is different to run Java on z compared to x86 platforms.
a. One of the advantages is seen with garbage collection (GC). GC is the way Java manages memory. As per the IBM internal study, a performance improvement of 92% was seen with garbage collection on z compared to x86. The minimized pause time on z for GC improves the performance of the executing applications.
b. The next feature is based on Flynn’s architecture, where SIMD (single instruction, multiple data) improves performance by executing a single instruction on multiple data at once. It is efficient when you need to perform the same instruction on large amounts of data.
c. z is very efficient in data compression since most of the data is compressed for efficient storage usage. Compression and decompression do degrade performance. The new Z has a built-in compression accelerator on the chip, which improves the performance of Java programs.
Key components of Java on z (non-exhaustive)
The Mainframe applications are typically divided into online and batch, Java on z has different components to interact with both mainframe applications.
1. Batch: BPXBATCH for batch which runs on USS — Unix System Services, and JZOS, which runs as a separate address space on z/OS .
2. Online: JCICS to interact with CICS , JCA with IMS.
3. As previously stated, one of the benefits of Java is the ability to leverage existing business logic. The component JNI — Java Native Interface — allows programs written in other languages such as COBOL, RPG, C, C++, and Assembler to be called by Java.
4. Standard Java SDK and encoding feature for EBCIDIC to ASCII conversion and vice versa. That is, you can use any Java program from the x86 platform to run on the z platform with no or minimal changes.
It’s noteworthy that developing Java on z doesn’t differ significantly from development on the x86 platform. The same toolsets utilized by Java developers are accessible on z, facilitating increased adoption of Java on this platform among companies.
Watsonx code Assistant for z
IBM Watsonx Code Assistant for Z (WCA4Z) is a GenAI-assisted solution to convert COBOL to Java and run it on a mainframe. WCA4Z solutions will be powered by IBM’s WatsonX. The AI code model, which will have knowledge of 115 coding languages and have learned from 1.5 trillion tokens and 20 billion parameters, is on target to become one of the largest generative AI foundation models for code automation in the space of Cobol and Java.
Conclusion
With half of the mainframe clients using Java in production environments and the advent of WCA4Z, the number is going to increase in the future. Clients are looking for ways to modernize their software to better complement the hardware capabilities of z, and Java is one of the preferred paths to meet this goal.
References:
[1] https://www.idc.com/getdoc.jsp?containerId=prUS48058021
[2] https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-java