You can use CTF Trace to troubleshoot PL/I code compiled with the -ctf compiler option.
CTF Trace is documented in detail in the Consolidated Tracing Facility topics and subtopics. In this section, we provide additional details specific to using CTF Trace to diagnose problems with PL/I applications.
The CTF Trace accesses the ctf.cfg file for information about trace output. To ensure that this configuration file contains all that is required to perform a trace on your PL/I application, edit the ctf.cfg file before running the facility. We have provided a sample CTF configuration file that you can use to get started. See Example CTF Configuration File for details.
You can automatically generate a CTF trace for entry into a PL/I procedure and exit from the procedure. The 6 event in a PL/I trace shows the line number at which the PL/I procedure was entered, and the 7 event shows the line number where the PL/I procedure was exited.
To automatically generate 6/7 events, compile using the -ctf directive indicating the level of reporting and the type of trace (#syspgm or #pgm) using two parameters. For example:
-ctf 1,16
Where:
For complete information about using the -ctf compiler option, see Compiler Options.
The most common issue with CTF is that a trace file is not actually produced. Use the following list to check that each statement is true. If not, correct the issue and try again.