Sample COBOL code for usage data collection

When you enable usage data collection, the generated COBOL source program adds a reference to the BRCCONST and BRCCONWS copybooks.

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.

The following code extract shows an example of the type of code that is generated when you set the usage data collection flag. It shows the references to the BRCCONST and BRCCONWS copybooks in the WORKING-STORAGE SECTION, and the code that handles usage data collection in the PROCEDURE DIVISION.

       IDENTIFICATION DIVISION.
       PROGRAM-ID. R4CZOSRM IS INITIAL PROGRAM.

      * This COBOL program is generated from the following ruleset: miniloan
      * Created at 2010/03/05 10:07:02.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
           COPY BRCCONST.
           COPY BRCCONWS.
       .
       .
       .
    
       LINKAGE SECTION.
           COPY MINILOAN.

       PROCEDURE DIVISION USING BORROWER LOAN.
       TASK1-SMF.
           INITIALIZE BRCC-CONN-AREA
           MOVE "miniloan" TO BRCC-CONN-RULESET-NAME OF BRCC-R4C-DATA
           MOVE "20100305" TO BRCC-CONN-CREATE-DATE OF BRCC-R4C-DATA
           MOVE "100702" TO BRCC-CONN-CREATE-TIME OF BRCC-R4C-DATA
           MOVE BRCC-CONN-RS OF BRCC-R4C-CONSTANTS TO 
           BRCC-CONN-CREATE-METHOD OF BRCC-R4C-DATA
           COPY BRCCINIT.
           PERFORM TASK2-MAINFLOW
           COPY BRCCTERM.
           GOBACK.
      * RuleFlow mainflow
       TASK2-MAINFLOW.
           PERFORM TASK3-MAINFLOW-VALIDATION
           PERFORM TASK4-MAINFLOW-ELIGIBILITY.
      * RuleTask mainflow#validation
       .
       .
       .