Information
Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Compiling and Binding C Test Programs


Demonstration programs for C are provided with Code Debug CICS. Complete the following task to compile and bind those programs for use.

This task requires the 

Code Debug CICS

 installer.

Background

The C demonstration programs consists of the following load modules:


    • CWDEMC – Main program (includes Assembler and C external subroutines)
    • CWDYNC – A fetchable C subroutine
    • CWDLLC – A C DLL subroutine
    • CWDEMZCH – Optional main program.

These modules are built using the following SMXDSAMP source members:


    • CWDEMC – C main source
    • CWDEMDEF – C defines
    • CWDEMPRO – C function prototypes
    • CWDEMTYP – C typedefs
    • CWDEMWS – C working storage (global variable declarations)
    • CWDLLC – C DLL subroutine source
    • CWDYNC – C fetchable subroutine source
    • CWLESUBA – Assembler subroutine source
    • CWSUBC – C subroutine source
    • CWTBRATE – C Employee Rate Table
    • CWDEMZCH – Optional main source.

      Warning

      Important

      CWLESUBA, CWSUBC, CWDYNC, and CWDLLC all perform the same function. CWLESUBA and CWSUBC are both statically bound in module CWDEMC. CWDYNC is a separate module that is fetched and called. CWDLLC is a separate module that it dynamically bound at runtime.

In addition, the following SMXDSAMP members are used to build the C demo programs

    • CDEMOBLD – Build JCL
    • CDEMOLNK – Link-edit control
    • CZOSOPTS – Compile options member for the IBM z/OS C Compiler.

Task 4.1 Build the C Demo Programs

The C demo programs should be built as follows:

  1. If you do not have a source listing file in which to place the program listings, allocate and initialize one now.
  2. Allocate a private library and copy CDEMOBLD into it. BMC suggests a data set name of the form:
    your-hlq.CDEMO
  3. Edit member CDEMOBLD in your private library.
    1. Add a jobcard that conforms to your installation requirements.
    2. Change the TGTHLQ= statement to specify the high-level qualifier of the target data sets, for example,

      TGTHLQ=your-hlq

      This will create the following data sets:

      • your-hlq.OBJECT (temporary)
      • your-hlq.DEFSD (temporary)
      • your-hlq.LOAD (permanent)

        Warning

        Important

        If you already have a PDSE library that you want to use, delete the SYSLMOD DD statement and change the SYSLMOD DD statement in the LINK step to reference that library instead.

    3. Change the SAMPLIB= statement to specify the full name of the SMXDSAMP library built during the SMP/E install process.
    4. Verify and, if necessary, change the CBC= and CEE= statements to ensure that they specify the C compiler and LE library high-level qualifiers at your installation.
    5. Change the CICSHLQ= statement to specify the high-level qualifier of the CICS data sets at your installation.
    6. Change the CXLIB= statement to specify the full name of the ECC (Enterprise Common Components) SMP/E target library.
    7. Finally, change the DDIO= statement to specify the full name of your DDIO listing file.
    8. Submit the job.
  4. Ensure that you have defined transaction XCCC and programs CWDEMC, CWDYNC, and CWDLLC to your CICS region. (See SMXDSAMP members CSDXDTRN and CSDXDPRG for sample transaction and program definitions.)
  5. Add your-hlq.LOAD data set to the DFHRPL concatenation in your CICS region or copy the load modules to an existing load library that is already in that concatenation.
  6. If you created a new DDIO file in Step 1, you will need to define it to your CICS region.

You are now ready to test the C demo programs.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Code Debug for CICS 17.02