Improving the performance of the COBOL program decision table

If you generate a COBOL program for rule execution, you can improve decision table performance during rule execution by activating the Exit on First Match property.

About this task

Deprecated feature:

Deprecation icon 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.

Decision tables are often coded such that only one row of the table matches a rule. By default, even after a rule is matched, the search continues through the rest of the decision table.

To improve performance, you can set the Exit on First Match property for the decision table. In this case, the first matched rule in the decision table executes and the rule execution program exits the remaining rows are not searched for further matching conditions.

Important:

Before setting the Exit on First Match property, make sure that there are no overlap values in the decision table condition column.

Procedure

To set the Exit on First Match property:

  1. In the Rule Explorer, right-click the rule project that contains the decision table you want to configure and then select Properties > COBOL Management > COBOL Code Generation.
  2. On the COBOL Code Generation properties page, click the Decision Table tab.

    The Decision Table column lists all the decision tables in your rule project.

  3. In the Exit on first match column, select the check box next to each decision table you want to apply this property to.

    You set this property at decision table level, not project level.

  4. Click OK to save your selections and close the COBOL Code Generation properties page.

Results

During rule execution, the rule execution program skips the rest of the rows in the decision table after one row matches the conditions in the working memory.