Data structures in the COBOL copybook

A COBOL copybook to be used for generating a XOM must contain only data structures that can map to Java™ structures.

A COBOL copybook is a section of code that defines the data structures of COBOL programs.

Before writing your business rules, you identify the data structures on which you want to write and manage rules outside of your COBOL application. You use this information to identify all the COBOL data items required to write your business rules.

You can use a COBOL copybook to create an execution object model (XOM) for your rule project. You then use the COBOL-generated XOM to generate your business object model (BOM).

You can choose to execute your rules in a server environment (Rule Execution Server on WAS on z/OS® or zRule Execution Server for z/OS), or in Enterprise COBOL. To maintain this flexibility, when you create a copybook, use only data structures that map to Java structures.

When you create the COBOL XOM, the COBOL importer applies default mappings to the corresponding Java types. You can also use type converters to convert certain default mappings to Java types of your choice. See Mapping COBOL data items to boolean and date types and Creating custom types for COBOL data items.