Generate Java Record Framework classes from Cobol copy books. IBM developed the Java Record Framework to facilitate the translation between native Java types and byte streams expected by Enterprise Information Systems (EIS) such as CICS and IMS. Tooling for constructing classes that leverage the framework from Cobol copy books is provided by VisualAge for Java's Enterprise Access Builder (EAB). While record generation is typically done within the VisualAge IDE, EAB also provides command line access to record generation.

The first time a record is produced, it is likely to be done with EAB's GUI tool. But once the record has passed unit testing, regeneration due to a tweak of the copy book becomes monotonous. These Ant tasks have been developed to automate this process.

The general procedure is to first construct a record type from a Cobol copy book. The record type contains meta-information about the copy book's structure. The record type also serves as a factory for record objects. The record classes themselves are generated with the record type as one of the elements of the input. It is the record class that the user interacts with directly to provide/extract information to/from an EIS. Generally the record type and record are deployed together. For more information on the Java Record Framework, VAJ Enterprise Edition provides two PDFs: one on EAB and another on Java Records in particular.

These task definitions invoke the EAB command line interface. That means you must have EAB installed before these task definitions can be employed. In particular, the following three directories must be in the classpath when Ant runs.

  1. vajroot/eab/runtime30
  2. vajroot/ide/tools/com-ibm-ivj-eab-record
  3. vajroot/ide/project_resource/IBM IDE Utility class libraries

The last entry above has spaces which will likely cause grief. I made things work by copying (don't rename this one!) the offending directory to a new one without spaces.