Introduction

COBOL Transformers Generator overview

LegStar COBOL Transformers Generator, (coxbgen for short), is a code generator that produces COBOL to Java Transformers.

The COBOL Transformers Generator is available either as ant scripts or as an Eclipse plugin.

The major input to the generation process is an XML Schema with COBOL annotations. LegStar has 2 tools that generate such XML Schemas:

How to get it

coxbgen is one of the several LegStar modules. As such it is generally easier to download the complete product.

However, if you feel comfortable enough, you can also download a standalone distribution by following this link.

The COBOL Transformers generator can be installed as an Eclipse plugin. More details on this option are available on the LegStar Eclipse site.

COBOL Transformers

Transformers are java classes that you can use to transform mainframe data to Java, XML or JSON. These same Transformers can also turn Java objects, XML or JSON to mainframe data.

Transformers don't make any assumption on where the mainframe data originated from. As far as Transformers are concerned, mainframe data is the content of a byte array.

Transformers have detailed knowledge of the mainframe data internal structure and can handle a large variety of mainframe data types such as compressed numerics, variable size arrays and redefines.

Internally, Transformers use JAXB Coxbgen produces JAXB Classes with COBOL annotations. These classes are not different from regular JAXB Classes apart from additional annotations providing meta-data to map Java types with COBOL types.

An important class is CobolElement which is a java annotation that represent the mapping between Java properties and a Cobol data elements.

Transformers use LegStar runtime libraries which provide low-level conversions for simple types such as strings, Cobol packed decimals, Cobol zoned decimals, simple arrays, etc.

Learn more

For instructions on how to use coxbgen follow this link.

For answers to common questions about LegStar coxbgen, see the FAQ.