Compiling and Binding C Test Programs
Related topic
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.
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:
- If you do not have a source listing file in which to place the program listings, allocate and initialize one now.
- Allocate a private library and copy CDEMOBLD into it. BMC suggests a data set name of the form:
your-hlq.CDEMO - Edit member CDEMOBLD in your private library.
- Add a jobcard that conforms to your installation requirements.
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)
- Change the SAMPLIB= statement to specify the full name of the SMXDSAMP library built during the SMP/E install process.
- 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.
- Change the CICSHLQ= statement to specify the high-level qualifier of the CICS data sets at your installation.
- Change the CXLIB= statement to specify the full name of the ECC (Enterprise Common Components) SMP/E target library.
- Finally, change the DDIO= statement to specify the full name of your DDIO listing file.
- Submit the job.
- 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.)
- 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.
- 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*