COBOL considerations specific to COBOL rule subprograms
You have extra things to consider when you choose to generate COBOL rule subprograms as an execution option.
The COBOL code generation feature is deprecated in V8.5. This feature will be removed in a future release of the product. Use the COBOL Generation Project Migration wizard to migrate your Rules for COBOL project to a zRule Execution Server for z/OS® compatible rule project. See Deprecated features for migration details.
Designing business object models
To define a business object model (BOM), you first generate a XOM from a COBOL copybook, you use the XOM to generate BOM, and then you define methods for the BOM. For COBOL code generation, you must also implement your methods in COBOL.
COBOL consideration | Description | Further information |
---|---|---|
COBOL methods for BOM classes | You must implement the BOM methods to COBOL. | Implementing BOM methods for COBOL code generation |
Method parameter types | When you define methods, you can use only certain types as arguments and return values. | Method parameter types |
Orchestrating
You can use ruleflows in your rule project when you choose COBOL code generation, but the ruleflow structures must be compatible with COBOL code execution. The following table lists the limitations that apply to the ruleflow functions you can use.
COBOL consideration | Description | Further information |
---|---|---|
Rule task ordering | Whichever execution mode you choose, the generated COBOL rule is executed as sequential mode. | Ruleflows and COBOL code generation |
Ruleflow elements | You can use most, but not all ruleflow elements. | Ruleflows and COBOL code generation |
Authoring
If you intend to generate COBOL code and execute your rules in Enterprise COBOL, you must make sure that the rule authoring features you use are compatible with COBOL code execution.
COBOL consideration | Description | Further information |
---|---|---|
BAL keywords and features | When you write rules, you must make sure that the BAL keywords and features you use are compatible with COBOL code execution. | BAL keywords and features |
Rule and ruleset variables | You can use only certain types for rule variables
and ruleset variables. You can change the default mapping for primitive and String types. |
Variable mapping for COBOL |
Number rounding | You can use the ROUNDED clause to avoid truncation. | Number rounding |
Optimizing
You can use the Exit on First Match property to improve decision table performance during rule execution.
COBOL consideration | Description | Further information |
---|---|---|
Exit on First Match property | To improve decision table performance during rule execution, you can set the Exit on First Match property. The first matched rule on the decision table executes and the rule execution program exits the decision table without searching the remaining rows. | Improving the performance of the COBOL program decision table |