Compiling, linking, and running your programs

To collect program usage data, you do some additional steps when you compile, link, and run the generated COBOL program.

About this task

Before you execute the generated COBOL program, make sure that you have carried out the following tasks when you compile, link, and run the generated COBOL program.

Procedure

To compile, link and run your programs:

  1. To enable the compiler to retrieve the COBOL copybooks provided for usage data collection, add the COBOL copy library, ++HBRHLQ++.SHBRCOBC, to the compile step SYSLIB DD statement.

    For example: //SYSLIB DD DISP=SHR,DSN=ZILOG ++HBRHLQ++.SHBRCOBC

    You might already have several libraries that are specified to SYSLIB. Add SHBRCOBC to the concatenation.
  2. To link your generated COBOL programs correctly:
    1. Add a reference to the COBOL load library in the linkedit step

      //SHBRLOAD DD DISP=SHR,DSN=++HBRHLQ++.SHBRLOAD

      You add this reference so that the linkedit step can resolve zRule Execution Server for z/OS BRCC stubs.

    2. Include the following binder statement in the linkedit step to make sure that the binder includes the stub module that COBOL management supplies.

      INCLUDE SHBRLOAD(BRCBSTUB)

  3. To enable the generated COBOL program to identify zRule Execution Server for z/OS to use when collecting usage monitoring data, add the following DD statement to the job step that executes your COBOL program:

    //R4CS++SSID++ DD DUMMY

    Where ++SSID++ is the subsystem name of zRule Execution Server for z/OS, for example: //R4CSHBR1 DD DUMMY

    At run time, the generated COBOL program must be able to identify which zRule Execution Server for z/OS to use usage data collection.