Creating the BOM to COBOL mapping

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

  1. Right-click the rule project and then select Properties > COBOL Management > COBOL Enabled BOM.
  2. In the COBOL Enabled BOM pane, click Add.
  3. 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:
    • X: PIC X
    • 9: PIC 9
    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.

  4. When you are satisfied with the mappings, click Finish.
  5. Optional: Add another BOM entry that you want to enable for COBOL and repeat steps 3 and 4.