Trace statement: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with "TRACE Statement 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'...")
 
m (link repair)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
TRACE Statement
==Usage==
The TRACE statement acts very much like a PRINT or AUDIT statement with the
The <var>Trace</var> statement acts very much like
exception that the target for the TRACE statement can be dynamically changed by
a <var>Print</var> or <var>Audit</var> statement with the exception that the target for the <var>Trace</var>
RESET'ing the ULTRACE parameter. The ULTRACE parameter is a standard bitoriented
statement can be dynamically changed by RESET'ing the <var>[[ULTRACE parameter|ULTRACE]]</var> parameter.
user parameter where the bits mean:
The <var>ULTRACE</var> parameter is a standard bit-oriented user parameter where the
X'01' Send TRACE output to terminal.
bits mean:
X'02' Send TRACE output to audit trail.
<table class="thJustBold">                                                                               
X'04' Send TRACE output to a CCATEMP wrap-around trace table.
<tr><th>X'01'                                                                        
The default setting for ULTRACE is X'01' which means that the TRACE statement will
</th><td>Send <var>Trace</var> output to terminal.                                    
act pretty much like a PRINT statement. The bits can be combined so that output could
</td></tr>                                                                           
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
<tr><th>X'02'                                                                        
ULTRACE is set to 0, the request is cancelled.
</th><td>Send <var>Trace</var> output to audit trail.                                
The CCATEMP wrap-around trace table is a user-specific trace table that consists of a
</td></tr>                                                                           
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
<tr><th>X'04'                                                                        
is being routed to the trace table (ULTRACE X'04' set), the trace data on the oldest page
</th><td>Send <var>Trace</var> output to a CCATEMP wrap-around trace table.          
is discarded and the oldest page is re-used for the new trace data. The default value for
</td></tr>
ULTRACEP is 2.
</table>                                                                   
The wrap-around trace table is dumped in SirFact dumps, and it can be viewed with the
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.
following command when using the FACT subsystem to examine a dump:
The bits can be combined so that output could be sent to both the terminal
D[ISPLAY] T[RACE][.{* | N}]
and the audit trail or to the CCATEMP wrap-around trace table and to the
where N specifies that the last n entries are to be displayed. Specifying D T will display
terminal and to the audit trail.
all trace entries, and specifying D T.20 will display the last 20.
If a <var>Trace</var> statement is executed when <var>ULTRACE</var> is set to 0, the request is
The wrap-around trace table can also be examined with the $TRACE2LIST function
cancelled.
(“$TRACE2LIST: Copy wrap-around trace table to $list” on page 52).
ULTRACE and ULTRACEP can both be RESET via the $RESETN function.
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
<var>[[ULTRACEP parameter|ULTRACEP]]</var> user parameter.
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 (<var>ULTRACE</var> 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 <var>ULTRACEP</var> is 2.
The wrap-around trace table is dumped in <var class="product">[[SirFact]]</var> dumps, and it can be viewed
with the following command when using the FACT subsystem to examine a dump:
<p class="code"> D[ISPLAY] T[RACE][.{* | N}]
</p>
where <code>N</code> specifies that the last ''n'' entries are to be displayed.
Specifying <code>D T</code> will display all trace entries,
and specifying <code>D T.20</code> will display the last 20.
The wrap-around trace table can also be examined with the <var>[[SirFact $functions#tr2list|$Trace2List]]</var> function.
<var>ULTRACE</var> and <var>ULTRACEP</var> can both be <var>RESET</var> via the <var>[[$Resetn]]</var> function.
 
==Syntax==
As described above, the <var>Trace</var> statement is a variant of the <var>Print</var> statement, and so the syntax is the same:
 
{{Template:Trace statement syntax}}
 
==See also==
The trace destination setting (as specified by the <var>ULTRACE</var> parameter) also controls:
<ul>
<li>[[Text and Html statements]] with the <var>Trace</var> option
<li>The <var>[[TraceText statement|TraceText]]</var> statement
<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>
 
[[Category:User Language statements]]
[[Category:User Language statements]]

Latest revision as of 21:42, 1 March 2016

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.

Syntax

As described above, the Trace statement is a variant of the Print statement, and so the syntax is the same:

Trace printSpecifications

See also

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