Who

Java developers

To do What

Can easily write and deploy Java applications that make use of services that are unique to z/OS.

Why is it important

We are providing a set of helper classes called the JZOS toolkit. This API toolkit helps Java developers make use of unique mainframe services right inside their Java applications. services like: accessing traditional mainframe data sets, submitting jobs, communicating with the system console, interop with COBOL or Assembler transaction data.

This guide will go through some examples and highlight some of the steps that are needed to deploy Java applications on the mainframe.

Real-life scenario – User Story

As a Java developer for an insurance company, I am tasked with creating a batch processing application that read, write, and maintain a list of claims using z/OS mainframe system and storage.

6 comments on"JZOS APIs"

  1. Harold Barnes November 03, 2017

    I’m looking for information on how to call a stand-alone java application running on z/OS from a batch HLASM program running on z/OS. I’m familiar with the use of CEEPIPI and using it to call C programs from HLASM. Is there something similar for Java? Do I need to write a C==>Java interface that can be called using CEEPIPI?

  2. Hi Harold,
    I don’t know a lot on the HLASM side but I believe you’re going the correct route of HLASM->C->Java. For the C to Java invocation, you’ll want to use JNI (Java Native Interface) calls to cross the language boundary between C and Java.

    Since it’s a batch application, you should be ok starting the JVM from your C layer since it probably only needs to live for the duration of the batch job versus being persistent.

    https://www.codeproject.com/Articles/22881/How-to-Call-Java-Functions-from-C-Using-JNI

  3. In COBOL we use PIC X. to manipulate/refer individual Bytes of COMP-3/COMP fields. How can we achieve that in JZOS API? Tried a lot by converting Bytes to String but no success. Is there any documentation regarding this?

  4. Madhu,

    The “IBM Record Generator for Java” is a utility that can take COBOL or Assembler structures and produce a Java class that allows you to get/set fields in a byte array based on their data type. You can use the utility to keep the Java class in sync with your with COBOL data structure so that both your COBOL application and Java application can interact with the data structure and handle assigning proper Java datatypes for different COBOL types (PIC X, COMP*, etc).

    Here is a link to the utility: https://developer.ibm.com/mainframe/products/record-generator-for-java/

    Kevin

  5. In our shop while running Batch Jobs we Dynamically allocate a DD File and that File sits in JCL Sysout. Along with Allocation of DD file we assign JES attributes also to that file Like Class Destination, Forms etc. So When I see JCL I see something like below.
    DDNAME StepName ProcStep DSID Owner C Dest
    JESMSGLG JES2 2 XXXXXXX O LOCAL
    JESJCL JES2 3 XXXXXXX O LOCAL
    JESYSMSG JES2 4 XXXXXXX O LOCAL
    SYSPRINT STEP0010 105 XXXXXXX O LOCAL
    SYSOUT STEP0030 108 XXXXXXX O LOCAL
    DYNDD1 STEP0030 117 XXXXXXX X DEST
    OUTPUT STEP0040 FTP 116 XXXXXXX O LOCAL

    above DYNDD1 is dynamically allocated (no reference to this DD in JCL), How can we achieve this in JAVA? I tried looking in “bpxwdyn” but couldn’t find a way. can some one please help me here?

Join The Discussion

Your email address will not be published. Required fields are marked *