You can convert a Java™ BOM and map Java data types to COBOL structures so that the converted BOM uses data structures, class types, and characters that are compatible with Enterprise COBOL code.
About this task
To execute business rules in COBOL, the BOM must contain
COBOL structures. You can then generate a COBOL copybook from it.
You can also generate a COBOL copybook from several BOM entries. Note: You
cannot use a BOM that is based on a dynamic XOM to generate a COBOL
copybook.
Procedure
- Right-click the rule project and then select .
- In the COBOL Enabled BOM pane, click Add.
- In the Select BOM entry dialog, select
a BOM entry that you want to enable for COBOL, and then click OK.
The table on the page Configure type setting for
COBOL items shows the default mapping between the Java structures in the BOM and the
COBOL structures.
You can change the following default COBOL
mapping:
- The COBOL name
- The COBOL Picture/Date Format
- The COBOL usage
The Java enum data
type is mapped to PIC 9 by default. You can change it by double-clicking
the
COBOL Picture / Date Format field of the
corresponding class and selecting one of the following options in
the drop-down menu:
The data type of the attributes that are associated with the
class changes automatically to match the data type of the class.
If no type parameters are specified for the keys and the values for Map in the Java XOM, the Java Type field is empty by default for
the keys and the values. Click the Java Type field for the key and the value
and select a Java type.
You
can also disable the COBOL mapping for some BOM attributes by clearing
the corresponding Enable check box. The disabled
attributes are not included in the generated copybook.
- When you are satisfied with the mappings, click Finish.
- Optional: Add another BOM entry that you want
to enable for COBOL and repeat steps 3 and 4.