Tracing and Instrumentation

CTF tracing (using BUILTINs PLICTF and PLICTFHX, and other means), while extremely useful in diagnosing malfunctioning programs, can impact performance of PL/I programs. The same applies to any instrumentation you may have designed into the application.

Based on the nature of the application, you must decide on the right balance between performance and readily-available diagnostics. Micro Focus recommends protecting all CTF tracing with a bit flag on an IF-THEN statement, so that the tracing logic is only executed if/when you need it. As an example, you may be using concatenation of multiple variables, that requires not only expensive intermediate memory allocation but also data conversions; you do not want this logic executed in production mode unless you are trying to track down a specific problem.