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:
- In the Rule Explorer view, select the reszminiloan
project.
- In the Set up a Decision Service part of Decision Service
Map, click Import XOM, and then select COBOL execution
object model. Click OK.
- On the Properties page, in the COBOL Execution Object
Model pane, click Add.
- On the Import COBOL XOM page, in the Execution object model
name field, type a name for the XOM. For example, reszminiloan-xom.
- Click Add.
- On the Select Cobol Copybook page, select File
System and then navigate to the HBRLDAT1 copybook.
See Before you start for
the copybook location.
- Select HBRLDAT1.cpy, and then click Open. Click
OK.
- On the Import COBOL XOM page, in the Package name
field, type a package name, for example, xom.
- Click Next to display a summary of the default Java types and class attributes derived from each COBOL item in the copybook.
- Change approved from type String to boolean,
by using the type converter:
- Expand the Loan item.
- Right-click the row that contains the approved data item and then click
Add Converter.
- On the Configure Converter Settings page, select Built-in
String to Boolean Converter.
- For the boolean True value, type T and for the
False value, type F.
- Click OK.
Attention: If you change the default mappings and then reimport the XOM, you lose your
configured values.
- 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.
- Click OK to close the Properties window.
Results
Notice the following addition in the Rule Explorer view: a
reszminiloan
Java XOM project.