Trace statement: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
The <var>Trace</var> statement acts very much like
The <var>Trace</var> statement acts very much like
a <var>Print</var> or <var>Audit</var> statement with the exception that the target for the <var>Trace</var>
a <var>Print</var> or <var>Audit</var> statement with the exception that the target for the <var>Trace</var>
statement can be dynamically changed by RESET'ing the [[ULTRACE parameter]].
statement can be dynamically changed by RESET'ing the <var>[[ULTRACE parameter|ULTRACE]]</var> parameter.
The ULTRACE parameter is a standard bit-oriented user parameter where the
The <var>ULTRACE</var> parameter is a standard bit-oriented user parameter where the
bits mean:
bits mean:
<table>                                                                                 
<table class="thJustBold">                                                                                 
<tr><th>X'01'                                                                           
<tr><th>X'01'                                                                           
</th><td>Send <var>Trace</var> output to terminal.                                     
</th><td>Send <var>Trace</var> output to terminal.                                     
</td></tr>                                                                             
</td></tr>                                                                             
<tr><th>X'02'                                                                           
<tr><th>X'02'                                                                           
</th><td>Send <var>Trace</var> output to audit trail.                                   
</th><td>Send <var>Trace</var> output to audit trail.                                   
</td></tr>                                                                             
</td></tr>                                                                             
<tr><th>X'04'                                                                           
<tr><th>X'04'                                                                           
</th><td>Send <var>Trace</var> output to a CCATEMP wrap-around trace table.             
</th><td>Send <var>Trace</var> output to a CCATEMP wrap-around trace table.             
</td></tr></table>                                                                     
</td></tr>
The default setting for ULTRACE is X'01' which means that the <var>Trace</var> statement
</table>                                                                     
will act pretty much like a <var>Print</var> statement.
The default setting for <var>ULTRACE</var> is X'01' which means that the <var>Trace</var> statement acts much like a <var>Print</var> statement.
The bits can be combined so that output could be sent to both the terminal
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
and the audit trail or to the CCATEMP wrap-around trace table and to the
terminal and to the audit trail.
terminal and to the audit trail.
If a <var>Trace</var> statement is executed when ULTRACE is set to 0, the request is
If a <var>Trace</var> statement is executed when <var>ULTRACE</var> is set to 0, the request is
cancelled.
cancelled.
   
   
The CCATEMP wrap-around trace table is a user-specific trace table that
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
consists of a set of CCATEMP pages up to a maximum specified by the
ULTRACEP user parameter.
<var>[[ULTRACEP parameter|ULTRACEP]]</var> user parameter.
If ULTRACEP pages are already in use when a <var>Trace</var> statement is issued
If <var>ULTRACEP</var> pages are already in use when a <var>Trace</var> statement is issued
and output is being routed to the trace table (ULTRACE X'04' set), the
and output is being routed to the trace table (<var>ULTRACE</var> X'04' set), the
trace data on the oldest page is discarded and the oldest page is re-used
trace data on the oldest page is discarded and the oldest page is re-used
for the new trace data.
for the new trace data.
The default value for ULTRACEP is 2.
The default value for <var>ULTRACEP</var> is 2.
   
   
The wrap-around trace table is dumped in <var class="product">[[SirFact]]</var> dumps, and it can be viewed
The wrap-around trace table is dumped in <var class="product">[[SirFact]]</var> dumps, and it can be viewed
Line 43: Line 45:
function.
function.
   
   
ULTRACE and ULTRACEP can both be RESET via the $RESETN function.
<var>ULTRACE</var> and <var>ULTRACEP</var> can both be <var>RESET</var> via the <var>[[$Resetn]]</var> function.


==See also==
==Seealso==
The trace destination setting (as specified by the ULTRACE parameter) also controls:
The trace destination setting (as specified by the <var>ULTRACE</var> parameter) also controls:
<ul>
<ul>
<li>[[Text and Html statements]] with the <var>Trace</var> option
<li>[[Text and Html statements]] with the <var>Trace</var> option
Line 52: Line 54:
<li>Trace methods in several classes, for example the <var>XmlDoc</var> <var>[[Trace (XmlDoc/XmlNode subroutine)|Trace]]</var> subroutine and the <var>Arraylist</var> <var>[[Trace (Arraylist subroutine)|Trace]]</var> subroutine
<li>Trace methods in several classes, for example the <var>XmlDoc</var> <var>[[Trace (XmlDoc/XmlNode subroutine)|Trace]]</var> subroutine and the <var>Arraylist</var> <var>[[Trace (Arraylist subroutine)|Trace]]</var> subroutine
</ul>
</ul>
[[Category:User Language statements]]
[[Category:User Language statements]]

Revision as of 18:23, 17 June 2014

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 acts 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.

Seealso

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