C language processor operation - Documentation for BMC AMI Enterprise Common Components 17.02
The C language processor reads the compiler listing produced by the C compiler and writes the compiler listing to the DDIO file and SYSCPRT. The source listing in DDIO can then be used to provide source support during a debugging or diagnostic session using BMC AMI DevX Code Debug for TSO.
Tip
Code Debug debuggers cannot access Inlined C Functions. Please make sure your C components are compiled with the NOINLINE parameter if you intend to debug them with Code Debug.
The C language processor can be run as either a preprocessor or postprocessor. The preprocessor sets up the environment for the C compiler, then invokes the C compiler and captures and analyzes the compiler listing. The postprocessor captures and analyzes the listing from a previous run of the C compiler. We recommend that you use the preprocessor. The postprocessor should only be used in situations where compiled source listings have been stored in machine-readable format.
Tip
CSS is downward compatible with listings created by a previous release of CSS. The viewing facility or the product being used to view the listing (such as BMC AMI DevX Abend-AID for CICS or XPED) must be at the same level or higher than that which was used to create the listing.
Preprocessor
Preprocessor Steps
- Determines the proper compiler options required to process the listing file.
- Automatically invokes the compiler or assembler to compile or assemble your source program.
- Writes the listing to the DDIO file and to SYSCPRT.
Preprocessor Benefits
- Better handling of compiler errors. By using the preprocessor, you can avoid the potential problems of processing a listing with compiler errors. The preprocessor, in conjunction with the CONDDDIO parameter, internally checks the return code from the compiler and doesn’t write a DDIO listing that contains errors. For example, if you set the CONDDDIO parameter to 4, the preprocessor will write the compiler listing to the DDIO file unless the compiler return code exceeds 4. The preprocessor can process the compiler errors more effectively than the postprocessor.
- Capturing of suppressed source code. When the following parameter is used, sections of source code can be suppressed from the compiler listing:
For C NOSHOWINC or NOEXPMAC
The preprocessor captures this information by forcing on more revealing compiler options.
- Automated compiler options. The postprocessor requires that certain compiler options be specified in order to process all needed sections of the compiler listing. The preprocessor can automatically pass the required options to the compiler.
- Simplified JCL. While the postprocessor requires that the user add a step after the compile step, the preprocessor requires only that minor modifications be made to your existing compile step.
Dynamically Allocated Files
The following files are dynamically allocated by the BMC AMI preprocessor. The attributes can be overridden by specifying a DD in the JCL.
Files Dynamically Allocated by the Preprocessor
DDname | Attributes |
|---|---|
CWPWRKn (0-6) | BLKSIZE=19000 SPACE(TRK,(100,80)) UNIT=SYSDA |
TEMPLIN | BLKSIZE=3200 SPACE(TRK,(200,100)) UNIT=SYSDA |
CWPERRM | SYSOUT=* |
SYSPRINT | SYSOUT=* |
SYSOUT | SYSOUT=* |
CWPPRTI | BLKSIZE=16093 SPACE(TRK,(100,200)) UNIT=SYSDA DISP=MOD |
CWPPRTO is dynamically allocated as a work file (for the preprocessor). SYSPRINT is where the listing goes.
Postprocessor
The postprocessor is executed as a single step — can be a separate job. It reads in the listing created from the compiler. Information is gathered from the source listing, XREF, data maps, and object code sections of the listing. This information is stored in a DDIO file member and is used by various BMC AMI products.
While the preprocessor is the preferred method of loading the compiled listing to the DDIO, there are situations that necessitate use of the postprocessor as a viable alternative. This is commonly found in production environments where the listings may be archived. Note that these are usually the default options at many shops.
Benefits of Postprocessing
- Exact match of compiled output listings with the executable load module. This is especially important in production environments where time is critical.
- Eliminates the risk of copybook or source code changes prior to recompiling the code since the listing reflects the code that is being executed.
- Significantly less time is needed to process source listings as opposed to recompiling the source code.