Running the assembler RecordClassGenerator
The assembler RecordClassGenerator requires the adatafile option to specify the location of the ADATA file. All of the other options use default values.
When you run IBM® Record Generator for Java™, make sure that your Java CLASSPATH points to the ibm-recgen.jar.
If you run on a non-z/OS platform, you must also include in the CLASSPATH the
ibmjzos.jar file.
ibmjzos.jaris available in the IBM SDK for z/OS® Java Technology Edition when using Java 8.ibmjzos.jarmust be downloaded from Java SDK Products on z/OS on IBM Support when using Java 11, Java 17 or Java 21.
For descriptions of all the available options, see Syntax of assembler RecordClassGenerator.
Examples
This example uses the DSECT MY_RECORD within the USER.ASSEM.ADATA(MYRECORD) PDS member and generates the source for a Java helper class file that is called MyRecord.java within the Java package assem.records. This is written to the directory generatedClasses/assem/records, based on the concatenation of the values on the ouputdir and package options.
java com.ibm.recordgen.asm.RecordClassGenerator \
adataFile="//'USER.ASSEM.ADATA(MYRECORD)'" \
package=assem.records \
class=MyRecord \
section=MY_RECORD \
outputdir=generatedClasses
This example uses, by default, the first DSECT that is found in the myRecord.adata file and generates the source for a Java helper class file called MyRecord.java within the Java package assem.records. This will be written to the directory generatedClasses/assem/records.
java com.ibm.recordgen.asm.RecordClassGenerator \
adatafile=myRecord.adata \
package=assem.records \
class=MyRecord \
outputdir=generatedClasses