ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/qypeendt.htm

305 lines
10 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>End Transaction (QYPEENDT, qypeEndTransaction) API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- Created for V5R2 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="Top_Of_Page"></a>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>End Transaction (QYPEENDT, qypeEndTransaction) API</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">Application identifier</td>
<td align="left" valign="top" width="15%">Input</td>
<td align="left" valign="top" width="25%">Char(20)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Transaction identifier</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4) Unsigned</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Application trace data</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Length of application trace data</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4) Unsigned</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Transaction start time</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Application performance counters</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Length of application performance counters</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4) Unsigned</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Service Program Name: QYPESVPG<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The End Transaction (OPM, QYPEENDT; ILE, qypeEndTransaction) API is used
together with the <a href="qypestrt.htm">Start Transaction</a> (QYPESTRT,
qypeStartTransaction) API and the <a href="qypelogt.htm">Log Transaction</a>
(QYPELOGT, qypeLogTransaction) API to collect performance data for user-defined
transactions. The End Transaction API is called by an application at the end of
a user-defined transaction.</p>
<p>This API can be used to provide both trace type of performance data -
collected by Performance Explorer (PEX) - and interval type of performance data
- collected by Collection Services.</p>
<p>If the Performance Explorer (PEX) is running, this API generates an end of
transaction trace record. In addition to the data supplied by the application
in the application trace data parameter, PEX will capture the current values of
performance counters associated with the current thread such as CPU time used,
I/O activity and seize/lock activity. After the End Performance Explorer
(ENDPEX) command is run, the application-supplied data
for this record is written to the QMUDTA field in the QAYPEMIUSR file. The
performance counters are written to individual fields in the QAYPEMIUSR and
QAYPETIDX files.</p>
<p>If Collection Services is collecting data for the user-defined transaction
(*USRTNS) category, this API will save transaction performance data for the
current transaction. This data includes transaction response time as well as
optional performance counters provided by the application in the application
performance counters parameter.</p>
<p>See <a href="qypestrt.htm#USAGENOTES">Usage Notes</a> for the Start
Transaction (QYPESTRT, qypeStartTransaction) API for more information.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>API Public Authority</em></dt>
<dd>*USE</dd>
</dl>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Application identifier</strong></dt>
<dd>INPUT; CHAR(20)
<p>The name of the application. Given that many applications could use this
API, the name should be chosen so that it is unique. Application identifiers
starting with "QIBM_Qccc_", where ccc is a component identifier, are reserved
for IBM use.</p>
<p>The application identifier is used as the transaction type by Collection
Services. The application identifier should be chosen carefully, because
Collection Services will only report information about the first 15 unique
transaction types for every job which uses user-defined transaction APIs. All
other transaction types for each job will be combined in a single type
*OTHER.</p>
</dd>
<dt><strong>Transaction identifier</strong></dt>
<dd>INPUT; BINARY(4) UNSIGNED
<p>Any sort of unique transaction identifier, such as a sequential number. In
order to collect meaningful data, the identifier passed to the End Transaction
API should be the same as the identifier used in the call to the Start
Transaction API for the same transaction.</p>
<p>The transaction identifier is not used by Collection Services.</p>
</dd>
<dt><strong>Application trace data</strong></dt>
<dd>INPUT; CHAR(*)
<p>Application-defined trace data to be saved by PEX. This can be any data that
the user wants to associate with this transaction - for example, the user ID of
the client performing the transaction, the name of the file being updated by
the transaction, or the account ID being accessed by the transaction. The data
can be up to 3032 bytes long. This data is reported by PEX in the QAYPEMIUSR
file. Application trace data is not processed by Collection Services.</p>
</dd>
<dt><strong>Length of application trace data</strong></dt>
<dd>INPUT; BINARY(4) UNSIGNED
<p>The length (in bytes) of application-defined trace data to be saved by PEX.
The value must be between 0 and 3032.</p>
</dd>
<dt><strong>Transaction start time</strong></dt>
<dd>INPUT; CHAR(8)
<p>The time (in MI timestamp format) that the transaction started. The user
should provide the transaction start time that was previously returned from the
call to the corresponding Start Transaction API. If a null pointer is passed
for this parameter, Collection Services will ignore this request. Transaction
start time is not used by PEX.</p>
</dd>
<dt><strong>Application performance counters</strong></dt>
<dd>INPUT; CHAR(*)
<p>Application-provided counter data to be collected by Collection Services.
The application can define from 0 to 16 BINARY(8) UNSIGNED counters that
Collection Services will collect. These counters may contain any kind of
information the application wants to associate with this transaction; for exampel,
the number of SQL statements processed to serve the transaction, the number of
pages printed for the transaction, and so on. The user should reset these counters
just before calling the Start Transaction API and provide these counters when
calling the corresponding End Transaction API. If the application trace data is
suitably organized - if it is a sequence of BINARY(8) UNSIGNED counters - the
application performance counters parameter can be a subset of the application
trace data parameter .</p>
<p>Application performance counters are not processed by PEX.</p>
</dd>
<dt><strong>Length of application performance counters</strong></dt>
<dd>INPUT; BINARY(4) UNSIGNED
<p>The length (in bytes) of the application-provided counter data to be
collected by Collection Services. This length can range from 0 (no counters) to
128 (16 BINARY(8) UNSIGNED counters) and must be a multiple of 8.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the
structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3>Usage Notes</h3>
<p>For the description of how Performance Explorer (PEX) and Collection
Services save and report performance data for this API, see <a href=
"qypestrt.htm#USAGENOTES">Usage Notes</a> for the Start Transaction API.</p>
<br>
<h3>Error Messages</h3>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF3C36 E</td>
<td align="left" valign="top">Number of parameters, &amp;1, entered
for this API was not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C3C E</td>
<td align="left" valign="top">Value for parameter &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF2 E</td>
<td align="left" valign="top">Error(s) occurred during running of &amp;1
API.</td>
</tr>
</table>
<br>
<hr>
API introduced: V5R2
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="qypscsca.htm">Top</a> | <a href=
"perfmgmt.htm">Performance Management APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>