We are pleased to announce that the IBM JZOS library is now available on the Maven Central Repository. This milestone demonstrates IBM’s continued commitment to delivering high-quality and dependable software solutions. The JZOS library is now more accessible to developers who wish to incorporate its features into their projects, resulting in faster development.
In this article, we aim to address questions you may have about the JZOS library. Our goal is to provide useful details about the JZOS functions and benefits in Java projects on the z/OS, to help you leverage this library to its full potential.
The JZOS is a native utility designed for the seamless execution of Java applications in z/OS environments, serving as both a batch job initiator and facilitator for started tasks. It allows the full integration of Java applications as job steps, enhancing existing batch processes. The accompanying JZOS toolkit provides Java applications direct access to z/OS data and system services. Notable features include streamlined execution in MVS batch jobs, simple configuration of the Java environment, dataset access through JCL DD statements, and interfaces to z/OS specific APIs like SMF and Catalog Search. The toolkit also enables communication with the MVS system console, invocation of z/OS Access Method Services, reading/writing MVS datasets from Java, passing condition codes, and access z/OS Workload Manager services. This integrated solution simplifies running Java on z/OS batch jobs, aligning its management with other compiled languages like COBOL and PL/I or other compiled languages.
The availability of the JZOS library on the Maven Central Repository is a significant step towards improving software development within the Java on IBM Z community. The Maven Central Repository makes it easier for developers to share and access projects via a centralized location for Java libraries and artifacts. Developers can now integrate JZOS into their projects in the same way as their other application dependencies.
What is the versioning strategy implemented for JZOS library?
The versioning strategy for the JZOS library is organized into a.b.c.d, with the initial three digits (a.b.c) representing the core JZOS version, while the last digit 'd' signifies the Maven version. This standardized approach is consistently adhered to for the JZOS jar available on Maven Central, facilitating a clear understanding of versioning conventions.
For instance, the JZOS jar version
Furthermore, the JZOS jar version 3.x.y is designed to be compatible with Semeru (Java) 11/17. The corresponding Maven Central deployed version is denoted by the 3.x.y.z version. This versioning strategy ensures that users can readily identify the compatibility and Java version support associated with each iteration of the JZOS library.
What can you achieve with the JZOS jar from the Maven Central Repository?
The JZOS jar deployed on the Maven Central Repository provides the public interface, class, and method definitions to program against the JZOS APIs. The JZOS APIs can only be executed on the IBM z/OS platform, this JZOS jar does not include any implementations and will return only 0s and nulls upon execution on non-z/OS platforms. Projects with JZOS Maven dependencies will seamlessly leverage the full JZOS library from the SDKs for Java on z/OS. Below are some potential use cases and benefits of deploying the JZOS jar to the Maven Central Repository:
-
Dependency Resolution and Management: By deploying the JZOS jar with proper metadata, developers can use it as a placeholder for a real implementation. This allows other projects to declare the JZOS jar as a dependency, enabling proper resolution and management of the library's version and transitive dependencies during the build process.
-
API Documentation and Interface Design: The JZOS jar can act as a blueprint for the library's API (Application Programming Interface) and serve as a form of API documentation. Other developers can see the available classes, methods, and their signatures, aiding in understanding how to interact with the library.
-
Collaboration and Early Development: Deploying the JZOS jar can enable collaboration between teams working on different components of a larger project. Teams can start their development work based on the jar, allowing parallel development of various modules before the complete implementation is available.
Further readings on installing Java on z/OS machine:
How to add JZOS to your project from the Maven Central Repository?
Importing JZOS from Maven and Gradle involves specifying the dependency in the respective build configuration files. Below are the instructions for importing the JZOS library using Maven and Gradle:
1. Open your Maven project in an IDE or navigate to the project directory using a terminal.
2. Locate the ‘pom.xml’ file in the root directory of your project
3. Inside the ‘<dependencies>’ section of the ‘pom.xml’, add the following dependency for JZOS:
<groupId>com.ibm.jzos</groupId>
<artifactId>ibm.jzos</artifactId>
<version>3.1.3.1</version>
<scope>provided</scope>
|
Make sure to replace the artifact ID and version number used in your project.
4. Save the ‘pom.xml’ file
5. Trigger a Maven build, either through your IDE or using the command ‘mvn clean install’ in the terminal. This will download the JZOS jar from the Maven Central Repository and include it in your project.
1. Open your Gradle project in an IDE or navigate to the project directory using a terminal.
2. Locate the ‘build.gradle’ file in the root directory of your project.
3. Inside the ‘dependencies’ block of the ‘build.gradle’, add the following dependency for JZOS:
compileOnly ‘com.ibm.jzos:ibm.jzos:3.1.3.1’ |
Ensure to replace the artifact ID and version number used in your project.
4. Save the ‘build.gradle’ file.
5. Trigger a Gradle build, either through your IDE or using the command ‘gradle build’ in the terminal.
6. This will fetch the JZOS jar from the Maven repository and integrate it into your project.
Our team has accomplished a key milestone by successfully uploading our JZOS library to the Maven Central Repository. This achievement demonstrates our dedication to delivering excellent software solutions to both IBM z/OS mainframe environment developers and the larger Java community. With the widespread availability of JZOS, developers can easily integrate this library into their applications. This will allow them to take advantage of its smooth connection with z/OS system services, high-performance access methods, and security integration features.
We are thrilled to make the JZOS library widely available to developers, enabling them to build reliable and effective Java applications on the z/OS platform. We hope that our library will have a positive effect on organizations all around the world by offering an excellent resource for developers looking to capitalize on the advantages of the mainframe environment.