The A-option allows you to specify a level of tracing for QMF application support services.
The A-option setting can be A0, A1, or A2. A0 is the default and is interpreted as the signal for no A-tracing at all. A1 and A2 can then call for increasingly detailed results. This is the pattern used for the other QMF trace options.
You specify the A-option in the same way you specify the L-option: through a QMF SET command, or by entering it on the screen after you execute the DISPLAY PROFILE command. For example, you can enter the following just before you invoke the application you are debugging:
SET PROFILE (TRACE=L2A1)
Then, when you begin your application, both L2 and A1 tracing are in effect.
To determine the current A-option setting, look at the variable DSQAO_APPL_TRACE. Its value is 0, 1, or 2, respectively, for the settings A0, A1, or A2. You can use the value of DSQAO_APPL_TRACE to select the kind of tracing you want in your application, as in Figure 26.
/* REXX program to set tracing */ call dsqcix "GET GLOBAL(A_TRACE=DSQAO_APPL_TRACE" if a_trace > 0 then do /* trace code for both A1 and A2 */
·
·
·
if a_trace = 2 then do /* trace code for just A2 */
·
·
·
end end
Nested DO-groups like the ones in Figure 26 can appear throughout an application. Where they appear, they take "snapshot" dumps of certain data areas, print the values of certain critical variables, load a debugging module, or perform any other diagnostic procedure that can help you debug the application. Precisely what is done depends on the setting in effect for the A-option while the application is running.
A good place for A-option code is in a large application. Consider leaving this code in the application after you finish your debugging. Doing this does not produce A-trace output if you run the application with an A0 setting. If you modify the application, and in the process introduce a bug, you can run this code again.
[ Previous Page | Next Page | Contents | Index ]