Mapping Java data types to COBOL data structures
Learn how the COBOL structure maps to the Java™ structure, and about the limitations of mapping.
- Role of the COBOL copybook
A COBOL copybook contains a section of code that defines data structures of COBOL program. You can generate a copybook from an existing Java rule project. - Supported Java data types for mapping to COBOL data structures
To share rules with COBOL applications, the BOM must use only Java types that map to COBOL structures. - Collection type
Collection interface and its concrete implementation classes in Java are supported when Java types map to COBOL structures. - Enum type
The enum data type in Java is supported when Java types map to COBOL structures. You can specify that it maps to the PIC X type or the PIC 9 type in COBOL. - Map type
The Map interface and its concrete implementation class in Java is supported when Java types map to COBOL structures. The key-value pairs in Map map to a COBOL group table. The keys map to Map-key and the values map to Map-value in the group table. The size of the Map data maps to a numeric item as a table size in COBOL. - Unsupported characters and reserved words
If a BOM variable name contains a character that COBOL does not support, the copybook generation process outputs an error.
Parent topic: Converting a BOM to enable the BOM for COBOL