Building Java records using the JZOS Record Generator utility
When you are developing a Java™ program to link to a CICS® program with a COMMAREA or access a VSAM file, you need to map the binary record structure from a language copybook to Java data types. These examples demonstrate how the JZOS Record Generator is used to generate Java records from a COBOL copybook.
About this task
The IBM® JZOS Batch Toolkit for z/OS® SDK is a set of tools that are designed to help integrate Java applications with z/OS services. One of the key features that it provides is a record class generator, which imports language copybooks or Assembler DSECTs. The generator creates helper classes that marshal the data to and from the record structure. You can automate the creation of these records as a batch job on z/OS and use the generated record in a COMMAREA structure to be passed on a link from a CICS Java program to a language program. The JZOS generator is a Java based tool that takes the ADATA as input from a language compiler. The generator generates Java code to access the fields in the record structure. The ADATA provides additional information about a program. It is used by JZOS to produce the data mappings, and by other tools for symbolic debugging and cross-referencing.
The following procedure uses COBOL for demonstration purposes, but you can use any CICS supported language structure.
Procedure
Results
You generated your Java record classes based on the structure of your COMMAREA ready to be used within an Application.
For more information, see Developing Java applications by using JZOS APIs.