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

331 lines
8.9 KiB
HTML
Raw 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>Add Trace Point (QYPEADDT, qypeAddTracePoint) 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>Add Trace Point (QYPEADDT, qypeAddTracePoint) 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="45%">Application identifier</td>
<td align="left" valign="top" width="15%">Input</td>
<td align="left" valign="top" width="30%">Char(20)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Event subtype identifier</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</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">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 Add Trace Point (OPM, QYPEADDT; ILE, qypeAddTracePoint) API is used to
record application-defined trace data.</p>
<p>If Performance Explorer (PEX) is running, this API generates a trace record
of the type specified in the event subtype identifier parameter. 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
trace data is written to the QMUDTA field in the QAYPEMIUSR file (see <a href=
"#USAGENOTES">Usage Notes</a>). The performance counters are written to
individual fields in the QAYPEMIUSR and QAYPETIDX files.</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 &quot;QIBM_Qccc_&quot;, where ccc is a component identifier,
are reserved for IBM use.</p>
</dd>
<dt><strong>Event subtype identifier</strong></dt>
<dd>INPUT; CHAR(10)
<p>The Performance Explorer (PEX) event subtype to be used for the trace
record. Allowed values for this parameter are:</p>
<ul>
<li><em>*APPEVT1</em></li>
<li><em>*APPEVT2</em></li>
<li><em>*APPEVT3</em></li>
<li><em>*APPEVT4</em></li>
</ul>
<p>To configure PEX to collect data generated by this API, use the same event
subtype identifier on the application events (APPEVT) parameter of the Add PEX
Definition (ADDPEXDFN) command.</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 trace record. The data can be up to 3042
bytes long. This data is reported by PEX in the QAYPEMIUSR file.</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 3042.</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><a name="USAGENOTES"></a>Usage Notes</h3>
<p>Application-defined trace data is reported in the QMUDTA field of the
QAYPEMIUSR file.</p>
<p>The format of the QMUDTA field of the QAYPEMIUSR file is described
below.</p>
<p>The QMUDTA field has a common header. The following APIs use this
header:</p>
<ul>
<li><a href="qypestrt.htm">Start Transaction (QYPESTRT,
qypeStartTransaction)</a></li>
<li><a href="qypeendt.htm">End Transaction (QYPEENDT,
qypeEndTransaction)</a></li>
<li><a href="qypelogt.htm">Log Transaction (QYPELOGT,
qypeLogTransaction)</a></li>
<li><a href="#Top_Of_Page">Add Trace point (QYPEADDT,
qypeAddTracePoint)</a></li>
</ul>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">CHAR(4)</td>
<td align="left" valign="top" width="60%">"API " eye catcher</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">CHAR(20)</td>
<td align="left" valign="top">Application identifier</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Type of data:
<table>
<tr>
<td align="left" valign="top"><em>0</em></td>
<td align="left" valign="top">Generic trace point</td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Start of transaction</td>
</tr>
<tr>
<td align="left" valign="top"><em>2</em></td>
<td align="left" valign="top">End of transaction</td>
</tr>
<tr>
<td align="left" valign="top"><em>3</em></td>
<td align="left" valign="top">Log transaction</td>
</tr>
</table>
</td>
</tr>
</table>
<p>After the common header, the QMUDTA field has the following format for the
Add Trace Point API:</p>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">25</td>
<td align="center" valign="top" width="10%">19</td>
<td align="left" valign="top" width="20%">CHAR(1)</td>
<td align="left" valign="top" width="60%">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">26</td>
<td align="center" valign="top">1A</td>
<td align="left" valign="top">BINARY(4) UNSIGNED</td>
<td align="left" valign="top">Length of application trace data</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Application trace data</td>
</tr>
</table>
<br>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">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>
</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>