$Slstats: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Mlarocca moved page $SLSTATS to $Slstats: Lower case change)
m (remove Sys Man guide)
Line 1: Line 1:
<p>The $SLSTATS function lets you evaluate the relative expense of different processes in a single request by resetting the recording of since-last statistics at the point in a request where the function call appears.</p>
<p>
<b>Syntax</b>
The <var>$Slstats</var> function lets you evaluate the relative expense of different processes in a single request by resetting the recording of [[Using system statistics#User since-last statistics|since-last statistics]] at the point in a request where the function call appears.</p>
<p>The format of the $SLSTATS function is:</p>
 
<p class="code">$SLSTATS(['string' | %variable])
==Syntax==
<p>
The format of the <var>$Slstats</var> function is:</p>
<p class="code">$Slstats(['string' | %variable])
</p>
</p>
<p><var class="product">Model&nbsp;204</var> uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies. </p>
<p>
<p>The default value for the argument is EVAL. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled EVAL. This is true even if the first statement in a request contains a $SLSTATS call.</p>
<var class="product">Model&nbsp;204</var> uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies. </p>
<p>You can call the $SLSTATS function by embedding it in a PRINT statement or assigning it to a %variable. For example, the following statement initiates a new set of since-last statistics (labelled FND1) for the remainder of the request, or until the next $SLSTATS call appears:</p>
<p>
<p class="code">%X = $SLSTATS('FND1')
The default value for the argument is <var>EVAL</var>. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled <code>EVAL</code>. This is true even if the first statement in a request contains a <var>$Slstats</var> call.</p>
 
==Usage notes==
<p>
You can call the <var>$Slstats</var> function by embedding it in a <var>Print</var> statement or assigning it to a %variable. For example, the following statement initiates a new set of since-last statistics (labelled <code>FND1</code>) for the remainder of the request, or until the next <var>$Slstats</var> call appears:</p>
<p class="code">%x = $slstats('FND1')
</p>
</p>
<p>Note that each invocation of $SLSTATS produces a new SMF (System Monitoring Facility) record. If the identifying label is specified, then it replaces EVAL in the SMF record, as it does in the audit trail.</p>
<p class="note"><b>Note:</b> Each invocation of <var>$Slstats</var> produces a new SMF (System Monitoring Facility) record. If the identifying label is specified, then it replaces <var>EVAL</var> in the SMF record, as it does in the audit trail.</p>
<p>In addition to EVAL, there are several other labels generated by <var class="product">Model&nbsp;204</var> for audit trail and SMF records. These include:</p>
<p>
In addition to <code>EVAL</code>, there are several other labels generated by <var class="product">Model&nbsp;204</var> for audit trail and SMF records. These include:</p>
<p class="code">CMPL
<p class="code">CMPL
COPY
COPY
Line 18: Line 27:
REST
REST
</p>
</p>
<p>You can assume any label not listed above to be generated by an $SLSTATS call. (Note, however, that there is no prohibition against using the above labels with $SLSTATS.) For accounting purposes, any label generated by $SLSTATS should be included as EVAL statistics.</p>
<p>
<p>See the Rocket <var class="product">Model&nbsp;204</var> System Manager's Guide for detailed information on since-last statistics.</p>
You can assume any label not listed above to be generated by an <var>$Slstats</var> call. (Note, however, that there is no prohibition against using the above labels with <var>$Slstats</var>.) For accounting purposes, any label generated by <var>$Slstats</var> should be included as EVAL statistics.</p>
 
[[Category:SOUL $functions]]
[[Category:SOUL $functions]]

Revision as of 17:11, 3 November 2014

The $Slstats function lets you evaluate the relative expense of different processes in a single request by resetting the recording of since-last statistics at the point in a request where the function call appears.

Syntax

The format of the $Slstats function is:

$Slstats(['string' | %variable])

Model 204 uses the first four characters in the quoted string, or in the current value of the %variable, as a label to identify the section of the request to which the corresponding since-last audit trail entry applies.

The default value for the argument is EVAL. Because the recording of since-last statistics begins automatically with request execution, the first set of since-last statistics in the audit trail for any request is always be labelled EVAL. This is true even if the first statement in a request contains a $Slstats call.

Usage notes

You can call the $Slstats function by embedding it in a Print statement or assigning it to a %variable. For example, the following statement initiates a new set of since-last statistics (labelled FND1) for the remainder of the request, or until the next $Slstats call appears:

%x = $slstats('FND1')

Note: Each invocation of $Slstats produces a new SMF (System Monitoring Facility) record. If the identifying label is specified, then it replaces EVAL in the SMF record, as it does in the audit trail.

In addition to EVAL, there are several other labels generated by Model 204 for audit trail and SMF records. These include:

CMPL COPY DUMP EDIT LOAD REST

You can assume any label not listed above to be generated by an $Slstats call. (Note, however, that there is no prohibition against using the above labels with $Slstats.) For accounting purposes, any label generated by $Slstats should be included as EVAL statistics.