Trace statement

From m204wiki
Revision as of 22:24, 17 February 2011 by JAL (talk | contribs)
Jump to navigation Jump to search

Usage

The Trace statement acts very much like a Print or Audit statement with the exception that the target for the Trace statement can be dynamically changed by RESET'ing the ULTRACE parameter. The ULTRACE parameter is a standard bit-oriented user parameter where the bits mean:

X'01' Send Trace output to terminal.
X'02' Send Trace output to audit trail.
X'04' Send Trace output to a CCATEMP wrap-around trace table.

The default setting for ULTRACE is X'01' which means that the Trace statement will act pretty much like a Print statement. The bits can be combined so that output could be sent to both the terminal and the audit trail or to the CCATEMP wrap-around trace table and to the terminal and to the audit trail. If a Trace statement is executed when ULTRACE is set to 0, the request is cancelled.

The CCATEMP wrap-around trace table is a user-specific trace table that consists of a set of CCATEMP pages up to a maximum specified by the ULTRACEP user parameter. If ULTRACEP pages are already in use when a Trace statement is issued and output is being routed to the trace table (ULTRACE X'04' set), the trace data on the oldest page is discarded and the oldest page is re-used for the new trace data. The default value for ULTRACEP is 2.

The wrap-around trace table is dumped in SirFact dumps, and it can be viewed with the following command when using the FACT subsystem to examine a dump:

D[ISPLAY] T[RACE][.{* | N}]

where N specifies that the last n entries are to be displayed. Specifying D T will display all trace entries, and specifying D T.20 will display the last 20.

The wrap-around trace table can also be examined with the $Trace2List function.

ULTRACE and ULTRACEP can both be RESET via the $RESETN function.

See also

The trace destination setting (as specified by the ULTRACE parameter) also controls: