Ruleflows and COBOL code generation

You can use most ruleflow elements for COBOL code generation, but not all.

Note: The COBOL code generation feature is deprecated in V8.5.1. 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. For more information, see Migrating from Rules for COBOL.

Ruleflows control rule execution by specifying how tasks are linked together and by defining how, when, and under what conditions they are executed. For COBOL execution, a ruleflow provides a design for the COBOL statements in the COBOL code that you generate.

If you intend to execute your rules using a generated COBOL program, you must make sure that your ruleflow structures are compatible with COBOL code execution. This means that not all ruleflow elements are available for COBOL code generation. The following sections describe the limitations.

Rule task ordering

For COBOL, you can use only the following ruleflow settings:

The COBOL code generator does not check the execution mode or the rule ordering settings of the rule task. It assumes that the mode is set to sequential and the task ordering is set to literal. If you set a different mode or task ordering, you are not warned if there is an error.

Ruleflow elements you can use

You can use the following ruleflow elements with COBOL code generation:

Ruleflow elements you cannot use

You cannot use the following ruleflow elements:

Elements you cannot use Reason
Action tasks If you use an action task, the COBOL code generator generates an error when you generate the COBOL code.
Recursive ruleflow definitions If you use a recursive ruleflow definition, the COBOL code generator an error when you generate the COBOL code.
Runtime rule selection When you generate a COBOL program to execute rules, you do not use a rule engine.
Initial actions The COBOL code generator does not generate code for the initial action in a ruleflow. To initialize variables, you can assign values in the COBOL calling program.
Final actions The COBOL code generator does not support the final action in a ruleflow. You can implement the final action in the COBOL calling program.
Exit criteria of a rule task The COBOL code generator does not support the looping behavior defined by exit criteria.