< Previous | Next >

Task 2: Generating a XOM from a COBOL copybook

To execute your rules in a COBOL application, you use a COBOL copybook as the basis for your XOM.

About this task

A COBOL XOM provides the necessary mapping from COBOL to Java™ so that you can execute your rules in a COBOL application.

Procedure

To generate a COBOL XOM:

  1. In the Rule Explorer view, select the reszminiloan project.
  2. In the Set up a Decision Service part of Decision Service Map, click Import XOM, and then select COBOL execution object model. Click OK.
  3. On the Properties page, in the COBOL Execution Object Model pane, click Add.
  4. On the Import COBOL XOM page, in the Execution object model name field, type a name for the XOM. For example, reszminiloan-xom.
  5. Click Add.
  6. On the Select Cobol Copybook page, select File System and then navigate to the HBRLDAT1 copybook.

    See Before you start for the copybook location.

  7. Select HBRLDAT1.cpy, and then click Open. Click OK.
  8. On the Import COBOL XOM page, in the Package name field, type a package name, for example, xom.
  9. Click Next to display a summary of the default Java types and class attributes derived from each COBOL item in the copybook.
  10. Change approved from type String to boolean, by using the type converter:
    1. Expand the Loan item.
    2. Right-click the row that contains the approved data item and then click Add Converter.
    3. On the Configure Converter Settings page, select Built-in String to Boolean Converter.
    4. For the boolean True value, type T and for the False value, type F.
    5. Click OK.
    Attention: If you change the default mappings and then reimport the XOM, you lose your configured values.
  11. Click Finish to close the page and create the COBOL XOM.

    You see the new XOM on the Properties page in the COBOL Execution Object Model pane.

  12. Click OK to close the Properties window.

Results

Notice the following addition in the Rule Explorer view: a reszminiloan Java XOM project.
< Previous | Next >