125 lines
5.5 KiB
HTML
125 lines
5.5 KiB
HTML
|
<!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>Problem Determination APIs</title>
|
||
|
<!-- 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. -->
|
||
|
<!-- Begin Header Records ========================================= -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!-- File Edited December 2001 -->
|
||
|
<!-- 031112 JETAYLOR replaced API and/or Exit listings with -->
|
||
|
<!-- pagegenerator output from javascript array -->
|
||
|
<!-- 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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Problem Determination APIs</h2>
|
||
|
|
||
|
<p>The problem determination APIs are:</p>
|
||
|
|
||
|
<!-- ***** NOTE ***** Do not manually update text or links in this section. -->
|
||
|
<!-- Updates made in this section *will* be overlaid by automated tools -->
|
||
|
<!-- Notify User Technologies of needed updates to be made in XML for API finder.-->
|
||
|
<!--***************API BEGIN PASTE***************-->
|
||
|
<ul>
|
||
|
<li><A HREF="p0zdmp.htm">Qp0zDump()</A> (Dump formatted storage trace data) dumps the user storage specified by area to the user trace.</li>
|
||
|
<li><A HREF="p0zdmps.htm">Qp0zDumpStack()</A> (Dump formatted stack trace data) dumps a formatted representation of the call stack of the calling thread to the user trace.</li>
|
||
|
<li><A HREF="p0zdmpt.htm">Qp0zDumpTargetStack()</A> (Dump formatted stack trace data of the target thread) dumps a formatted representation of the call stack of the target thread to the user trace.</li>
|
||
|
<li><A HREF="p0zlog.htm">Qp0zLprintf()</A> (Print formatted job log data) prints user data specified by format-string as an information message type to the job log.</li>
|
||
|
<li><A HREF="p0zprnt.htm">Qp0zUprintf()</A> (Print formatted user trace data) prints user data specified by the format-string parameter to the user trace.</li>
|
||
|
</ul>
|
||
|
<!--***************API END PASTE***************-->
|
||
|
|
||
|
|
||
|
<p><strong>Note:</strong> These functions use header (include) files from the
|
||
|
library QSYSINC, which is optionally installable. Make sure QSYSINC is
|
||
|
installed on your system before using any of the functions. See <a href=
|
||
|
"unix13.htm">Header Files for UNIX-Type Functions</a> for the file and member
|
||
|
name of each header file.</p>
|
||
|
|
||
|
<p>The problem determination APIs are intended to be used as an aid in
|
||
|
debugging exception or error conditions in application programs. These
|
||
|
functions should not be used in performance critical code.</p>
|
||
|
|
||
|
<p>These functions can be used during application development, as well as after
|
||
|
the application is made available, as debug mechanisms. For example, one of the
|
||
|
following methods could be used:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>Use a compile option that activates the problem determination functions
|
||
|
during application development. When the application is ready to be made
|
||
|
available, recompile to deactivate the functions.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>Design a method to (quickly) check and see whether application problem
|
||
|
determination is desired, as well as an external method to activate application
|
||
|
problem determination. Then, use the problem determination functions in such a
|
||
|
manner as to check (at run time) whether or not the functions should be
|
||
|
called.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>Some of the problem determination functions dump or print to the user trace.
|
||
|
The user trace is a permanent user space object named <em>
|
||
|
QP0Z<jobnumber></em> in the QUSRSYS library. The user trace is created
|
||
|
the first time any thread in a job writes trace output. The following CL
|
||
|
commands can be used to manipulate the user trace properties and objects:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>Change User Trace (CHGUSRTRC) can be used to change the characteristics of
|
||
|
the user trace.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>Dump User Trace (DMPUSRTRC) can be used to dump trace records to a file or
|
||
|
to standard output.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>Delete User Trace (DLTUSRTRC) can be used to delete the user trace
|
||
|
objects.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>For those problem determination functions that use the user trace, the
|
||
|
following should be considered:</p>
|
||
|
|
||
|
<ul>
|
||
|
<li>The functions require no authority to the user trace object. See CL
|
||
|
commands CHGUSRTRC, DMPUSRTRC, and DLTUSRTRC for the authority required to
|
||
|
administer, display, or modify tracing information using the CL commands.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>No locks are held on the user trace between calls to the tracing functions.
|
||
|
The user trace can be deleted while in use. The next function that produces
|
||
|
trace output will create the user trace again.<br>
|
||
|
<br>
|
||
|
</li>
|
||
|
|
||
|
<li>If another job on the system has the same job number as an existing user
|
||
|
trace, the existing trace data is cleared, and the trace data from the new job
|
||
|
replaces it.</li>
|
||
|
</ul>
|
||
|
|
||
|
<hr>
|
||
|
<table cellpadding="2" cellspacing="2" align="center">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> |
|
||
|
<a href="unix.htm">UNIX-Type APIs</a> |
|
||
|
<a href="aplist.htm">APIs by category</a> </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|
||
|
|