Generating COBOL code in Decision Center

You can generate a COBOL program to execute rules in a COBOL application on z/OS®.

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.

This feature is only available if the project is COBOL enabled, and you sign in to the Decisions Center Enterprise console with Configuration Manager rights.

One of the execution options on z/OS is to generate a COBOL program to execute the rules. After you have generated the COBOL code, your development team can compile and build it, and then call it from the COBOL application.

To generate the COBOL code for a CICS® program, you must first define your CICS channel and container parameters.

Procedure

To generate COBOL code:

  1. On the Project tab in the Decision Center Enterprise console, click Generate Ruleset for COBOL and then provide the following details:
    Field Data entry
    Program ID

    Enter an ID for the generated COBOL code.

    Keep the length of the program ID a maximum of 8 characters, so that the code migrates easily to z/OS.

    Ruleset extractor If you want to use a ruleset extractor, select the required ruleset extractor from the drop-down list.
    Generate CICS Wrapper

    To generate the code for a CICS program:

    1. Click the tick box to display the CICS Wrapper Program ID field.

    2. Type an ID for the CICS wrapper program.

    If you are not generating code for a CICS program, leave the tick box unselected.

  2. Click Generate Code.

    The COBOL management tool generates the COBOL code for rule execution. If you selected the CICS option, it also generates a CICS wrapper program for the CICS channels and containers configured in Rule Designer.

  3. Once code generation is complete, click Download File to download the generated COBOL program to your computer.
  4. If you generated a CICS wrapper program, click Download CICS Wrapper File to download the generated CICS wrapper program to your computer.

    The Download CICS Wrapper File option displays only if you selected Generate CICS Wrapper on the first screen to generate the COBOL code for CICS.

Results

When the download is complete, your development team can upload the COBOL program and, if generated, the CICS wrapper program, to z/OS. They must compile the program within the main calling program.

If the code does not generate successfully, you obtain a Code Generation Error report. The report groups the errors by type, displaying the name and the error message.