Running the RecordXMLGenerator

Before the RecordXMLGenerator class can be used you must have generated an ADATA file from the COBOL or assembler language structure that you wish to use. The 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 from the IBM SDK for z/OS® Java Technology Edition.

For descriptions of all the available options, see Syntax for RecordXMLGenerator.

COBOL examples

This example uses the language structure MY-RECORD within the USER.COBOL.ADATA(MYRECORD) PDS member and generates an XML file called MyRecord.xml.

java com.ibm.recordgen.cobol.RecordXMLGenerator \        
   adataFile="//'USER.COBOL.ADATA(MYRECORD)'" \ 
   symbol=MY-RECORD \
   outputfile=MyRecord.xml
This example uses the first 01 level data structure found within the myRecord.adata file and generates the source for an XML file called MyRecord.xml.

java com.ibm.recordgen.cobol.RecordXMLGenerator \   
    adatafile=myRecord.adata \ 
    outputfile=MyRecord.xml

Assembler examples

This example uses the DSECT MY_RECORD within the USER.ASSEM.ADATA(MYRECORD) PDS member and generates an XML file called MyRecord.xml.

java com.ibm.recordgen.asm.RecordXMLGenerator \        
   adataFile="//'USER.ASSEM.ADATA(MYRECORD)'" \ 
   section=MY_RECORD \  
   outputfile=MyRecord.xml
This example uses the first DSECT found within the myRecord.adata file and generates an XML file called MyRecord.xml.

java com.ibm.recordgen.asm.RecordXMLGenerator \
    adatafile=myRecord.adata \ 
    outputfile=MyRecord.xml