The TRACE facility is the most commonly requested debugging aid. This tool allows very close inspection of the compilation processes that are performed and the machine code that is subsequently generated.
Three options are available for initiating the TRACE facility.
To initiate the Trace facility, code the OPTION command as follows:
►►─ OPTION ─ TRACE ─┬─ OFF ─────┬─────────────────────────────────────────────►◄ └─ phaseid ─┘
Specifies that the TRACE facility is to be immediately suspended. Since the output of the facility can be quite large, it is very useful to force the tracing of control blocks associated with a particular command or group of commands.
Indicates that a specific processing phase is to be traced. Valid values are A, C, G, H, or I. Trace multiple phases by coding multiple phaseids.
The purpose of each phase is as follows:
Compilation phase
Generation of record selection logic machine code
Execution of record selection logic
Generation of report printing logic machine code
Execution of report printing logic
When OPTION TRACE is coded without OFF or phaseid, all phases will be traced.
To invoke the TRACE facility in a z/OS environment using JCL specifications, code the following statement:
// EXEC PGM=DRREPORT,PARM='TRACE'
This method does not allow specification of the phaseid, as in the OPTION TRACE method.
Prior to the // EXEC command (in a z/VSE environment), you can place the following JCL command to invoke the TRACE method:
// UPSI 10000000
During compilation, the TRACE facility prints dashed lines, one at the beginning and one at the end, of each separate command. This is an attempt to show the activity being performed relating to each specific command encountered in the program.
Many of the items printed can be directly related to the compile diagnostics section, printed in conjunction with OPTION MAP. This includes:
This information helps the CA Support Specialist determine the processing sequence being performed and the program performing it. The format of the TRACE command changes significantly when code generation routines are executed.
The FST traces activity as the FST entries are reread and used in the creation of machine code. In addition, the code generated prints, followed by the ID of the program responsible for creating the code segment.
|
Copyright © 2014 CA.
All rights reserved.
|
|