COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Generating Instrumented Object Code for Use With the Code Coverage Tool
The Code Coverage Tool evaluates the code coverage provided by application test cases. The
tool uses information provided by a specially-instrumented object file to produce a report that
indicates which functions and blocks were executed, and how many times each was executed.
Using the Code Coverage Tool requires a special compilation to produce an object file containing
the required instrumentation. To create such an object file, specify the COLUMNS directive on the
compiler command line.
NOTE: The Code Coverage Tool is intended for data generation and collection in a test
environment only. The use of instrumented object code is not recommended for production
environments. Applications compiled with code coverage instrumentation will experience greatly
reduced performance. See the Caution in Chapter 15: Debugging Tools (page 699) for more
information.
For details on using the Code Coverage Tool, see the Code Coverage Tool Reference Manual.
Manipulating Object Files
You can use a TNS/E HP COBOL, TNS/E HP C, TNS/E HP C++, or EpTAL object file as input to
the linker to create a new target file. Using the linker, you can add code blocks and data blocks
compiled from TNS/E HP COBOL, TNS/E HP C, TNS/E HP C++, or EpTAL source files. For details,
see the eld Manual.
Compilation Statistics
Statistics are printed at the end of every compilation:
1. Linker statistics (if an object file was produced)
2. Compiler statistics
Example 152 is the result of a compilation that did not specify the RUNNABLE directive.
Example 153 is the result of a compilation that specified the RUNNABLE directive.
Compiler Output 525