Automated Record Generation
This is where you can download an Ant task I
wrote to generate record classes from Cobol copy books.
Latest Version: 1.1
|December 2, 2001
||Version 1.1, Added MVSRecordAttributes class to work around
problem of NT record attributes getting generated for remote
calls bound for MVS. Thanks to Harold Gartner for the
|November 27, 2001
||Version 1.0, First public version.
VisualAge for Java
is a software development tool for developing Java applications. The
Enterprise Edition has a feature called Enterprise Access Builder
(EAB). EAB provides special tools for accessing legacy systems such as
CICS and IMS as well as ERP systems such as SAP and PeopleSoft. For
legacy systems (also referred to as Enterprise Information Systems
(EIS), many of the transactions are written in Cobol. Some Cobol programs
define their input data structures in terms of a copy book.
One of EAB's features is to provide code generation of Java classes from
copy books that can provide data to their corresponding transactions in
the expected format. The first time such a record is generated from a
copy book, it is usually best done from the EAB GUI from inside VA Java.
But subsequent generations, due to minor changes in the copy book, are
best automated. This provides the following advantages.
- Automated generation runs faster than loading the EAB tool and
clicking though a series of editors and menus.
- A person not familiar with record generation, or even EAB, can
perform the task.
- The basic unit of source control becomes the copy book rather than
the generated record classes. In principle, this could be true even
without the automation. But one likes to think of the build as starting
from source control checkout. If the build starts from the record
classes themselves, then they should be in source control also. Record
generation during the build step only requires that the copy book be
in source control.
Integration with Ant
I submitted this task to the
Ant developer mailing list
for inclusion with other Ant optional tasks. Their feeling was they didn't
want to be responsible for maintaining something that was tightly integrated
with VA Java's internal API. Instead they suggested I post it here and they
would provide a link to it.
Since it is not incorporated as an optional Ant task, you need to provide
taskdef tags in your Ant script for each task (there are two).
This isn't too big of a deal. If I find that enough people are using it,
I'll make an appeal to the developer mailing list suggesting that they
incorporate it as an optional task with me as the contact person for any
Though I am an IBM employee, the javarec Ant tasks are not IBM
products. I have written them in my spare time and released them under the
Apache Software License
This basically means you can use/modify/distribute the software as
you like; just don't sue me for it.
Below are the files available for download.
This package is not formally supported in any bulletin board or
mailing list. I'll be glad to answer any questions that I can
regarding record generation. I usually won't be able to trouble
shoot legacy system configurations in my spare time. However,
if you're willing to up the ante, something can probably be
In any case, shoot me an email at
I'll see what I can do.