391 lines
15 KiB
HTML
391 lines
15 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">
|
||
|
<title>Print Trace Data (PRTTRC)</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body bgcolor="white">
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<a name="PRTTRC.Top_Of_Page"></a>
|
||
|
<h2>Print Trace Data (PRTTRC)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
||
|
<b>Threadsafe: </b>No
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#PRTTRC.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#PRTTRC.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#PRTTRC.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="PRTTRC"></a>
|
||
|
<p>The Print Trace (PRTTRC) command formats and writes the trace records to the selected output file. The trace records were written to a set of database files by the ENDTRC (End Trace) command and PRTTRC is used to format these trace records to a spooled output file or to a database output file. If the trace records are written to a spooled output file, printer file QPSRVTRCJ is used. The user data for the spooled file will be the same as the value specified for the DTAMBR (Data member) parameter.
|
||
|
</p>
|
||
|
<p><b>Restrictions:</b>
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>To use this command, you must have service (*SERVICE) special authority, or be authorized to the Service trace function of Operating System through iSeries Navigator's Application Administration support. The Change Function Usage (CHGFCNUSG) command, with a function ID of QIBM_SERVICE_TRACE, can also be used to change the list of users that are allowed to perform trace operations.
|
||
|
</li>
|
||
|
<li>You must have authority to the library and the database files within that library where the trace data is stored.
|
||
|
</li>
|
||
|
<li>If DLTTRC(*YES) is specified, you must have authority to the DLTTRC (Delete Trace Data) command.
|
||
|
</li>
|
||
|
<li>The record format of the database output file must match the record format of the IBM-supplied output file QASCTJFL.
|
||
|
</li>
|
||
|
<li>The ENDTRC command that produced the trace data and the PRTTRC command that processes and formats the trace data must be run on the same release of Operating System.
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="PRTTRC.PARAMETERS.TABLE">Parameters</a></h3>
|
||
|
<table border="1" cellpadding="4" cellspacing="0">
|
||
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
||
|
<tr>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#PRTTRC.DTAMBR"><b>DTAMBR</b></a></td>
|
||
|
<td valign="top">Data member</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
<td valign="top">Optional, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#PRTTRC.DTALIB"><b>DTALIB</b></a></td>
|
||
|
<td valign="top">Data library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*CURLIB</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="4"><a href="#PRTTRC.SLTJOB"><b>SLTJOB</b></a></td>
|
||
|
<td valign="top">Select jobs</td>
|
||
|
<td valign="top">Single values: <b><u>*ALL</u></b><br>Other values (up to 10 repetitions): <i>Qualified job name</i></td>
|
||
|
<td valign="top" rowspan="4">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: Select jobs</td>
|
||
|
<td valign="top"><i>Generic name, name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: User</td>
|
||
|
<td valign="top"><i>Generic name, name</i>, <b><u>*ALL</u></b></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 3: Number</td>
|
||
|
<td valign="top">000001-999999, <b><u>*ALL</u></b></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#PRTTRC.DLTTRC"><b>DLTTRC</b></a></td>
|
||
|
<td valign="top">Delete trace</td>
|
||
|
<td valign="top">*YES, <b><u>*NO</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#PRTTRC.SORT"><b>SORT</b></a></td>
|
||
|
<td valign="top">Sort by</td>
|
||
|
<td valign="top">*TIME, <b><u>*THREAD</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#PRTTRC.OUTPUT"><b>OUTPUT</b></a></td>
|
||
|
<td valign="top">Output</td>
|
||
|
<td valign="top"><b><u>*PRINT</u></b>, *OUTFILE</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#PRTTRC.OUTFILE"><b>OUTFILE</b></a></td>
|
||
|
<td valign="top">File to receive output</td>
|
||
|
<td valign="top"><i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: File to receive output</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top" rowspan="3"><a href="#PRTTRC.OUTMBR"><b>OUTMBR</b></a></td>
|
||
|
<td valign="top">Output member options</td>
|
||
|
<td valign="top"><i>Element list</i></td>
|
||
|
<td valign="top" rowspan="3">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 1: Member to receive output</td>
|
||
|
<td valign="top">
|
||
|
<i>Name</i>, <b><u>*FIRST</u></b></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 2: Replace or add records</td>
|
||
|
<td valign="top">
|
||
|
*ADD, <b><u>*REPLACE</u></b></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="PRTTRC.DTAMBR"></a>
|
||
|
<h3>Data member (DTAMBR)</h3>
|
||
|
<p>Specifies the member name for the trace data that you want to print. The member name will be the same as the trace session identifier specified on the Start Trace (STRTRC) and End Trace (ENDTRC) commands. The member name is the same for each of the physical files that contain the trace data.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the database file member that contains the trace data.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.DTALIB"></a>
|
||
|
<h3>Data library (DTALIB)</h3>
|
||
|
<p>Specifies the library that contains the set of database files where the collected trace data is stored.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*CURLIB</u></b></dt>
|
||
|
<dd>The trace data is printed from files in the current library for the job. If no library is specified as the current library for the job, QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the library that contains the trace data files.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.SLTJOB"></a>
|
||
|
<h3>Select jobs (SLTJOB)</h3>
|
||
|
<p>Specifies which jobs to include in the trace listing. This allows the user to reduce the size of the trace listing by selecting only a subset of the jobs that were part of the trace. Up to ten qualified job names can be specified.
|
||
|
</p>
|
||
|
<p><b>Single values</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ALL</u></b></dt>
|
||
|
<dd>All jobs that were part of the trace are included.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 1: Select jobs</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>generic-name</i></b></dt>
|
||
|
<dd>Specify the generic name of the jobs to be included in the trace listing. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. The asterisk substitutes for any valid characters. A generic job name specifies all jobs with job names that begin with the generic prefix.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the job to be included in the trace listing.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 2: User</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ALL</u></b></dt>
|
||
|
<dd>All jobs that match the specified job name are included.
|
||
|
</dd>
|
||
|
<dt><b><i>generic-name</i></b></dt>
|
||
|
<dd>Specify the generic user name of the jobs to be included.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the user of the job to be included.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 3: Number</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*ALL</u></b></dt>
|
||
|
<dd>All jobs that match the specified job name and user name are included.
|
||
|
</dd>
|
||
|
<dt><b><i>000001-999999</i></b></dt>
|
||
|
<dd>Specify the job number to further qualify the job name and user name.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.DLTTRC"></a>
|
||
|
<h3>Delete trace (DLTTRC)</h3>
|
||
|
<p>Specifies whether trace data is deleted after is has been printed.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*YES</u></b></dt>
|
||
|
<dd>The trace data in the database files is deleted after the print has completed.
|
||
|
</dd>
|
||
|
<dt><b>*NO</b></dt>
|
||
|
<dd>The trace data in the database files is saved. The DLTTRC (Delete Trace) command can be used to delete the data when it is no longer needed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.SORT"></a>
|
||
|
<h3>Sort by (SORT)</h3>
|
||
|
<p>Specifies how the trace data for each job is sorted in the specified output file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*THREAD</u></b></dt>
|
||
|
<dd>The trace data for each job is sorted by thread. If a job has multiple threads, the trace data for each thread is sorted by time.
|
||
|
</dd>
|
||
|
<dt><b>*TIME</b></dt>
|
||
|
<dd>The trace data for each job is sorted by time. If a job has multiple threads, the trace data for all threads in the job is sorted by time. This can result in the trace output for multiple threads to be intermingled.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.OUTPUT"></a>
|
||
|
<h3>Output (OUTPUT)</h3>
|
||
|
<p>Specifies whether the output from the command is printed with the job's spooled output or sent to a database file.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*PRINT</u></b></dt>
|
||
|
<dd>The output is printed with the job's spooled output.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b>*OUTFILE</b></dt>
|
||
|
<dd>The output is directed to the database file specified for the <b>File to receive output (OUTFILE)</b> parameter.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.OUTFILE"></a>
|
||
|
<h3>File to receive output (OUTFILE)</h3>
|
||
|
<p>Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.
|
||
|
</p>
|
||
|
<p><b>Qualifier 1: File to receive output</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the database file to which the command output is directed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 2: Library</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
|
||
|
</dd>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the library to be searched.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
<b>Note: </b>If this command creates the file, the text is "OUTFILE created by PRTTRC command" and the public authority is *EXCLUDE.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="PRTTRC.OUTMBR"></a>
|
||
|
<h3>Output member options (OUTMBR)</h3>
|
||
|
<p>Specifies the name of the database file member to which the output is directed when *OUTFILE is specified for the <b>Output (OUTPUT)</b> parameter.
|
||
|
</p>
|
||
|
<p><b>Element 1: Member to receive output</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*FIRST</u></b></dt>
|
||
|
<dd>The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the <b>File to receive output (OUTFILE)</b> parameter.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the file member that receives the output. If OUTMBR(member-name) is specified and the member does not exist, the system creates it.
|
||
|
<p>If the member exists, you can add records to the end of the existing member or clear the existing member and add the records.
|
||
|
</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Element 2: Replace or add records</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*REPLACE</u></b></dt>
|
||
|
<dd>The existing records in the specified database file member are replaced by the new records.
|
||
|
</dd>
|
||
|
<dt><b>*ADD</b></dt>
|
||
|
<dd>The new records are added to the existing information in the specified database file member.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="PRTTRC.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p><b>Example 1: Print and Delete Trace</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
PRTTRC DTAMBR(TRACE8) DTALIB(TRCLIB1) DLTTRC(*YES)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command formats and prints the trace data contained in database file members named TRACE8 in library TRCLIB1. The trace data members are removed after the trace data spooled file has been written. All jobs which were part of the trace will be part of the trace listing.
|
||
|
</p>
|
||
|
<p><b>Example 2: Print Subset Trace</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
PRTTRC DTAMBR(T123456789) DTALIB(QGPL)
|
||
|
SLTJOB(*ALL/QSYS/QCMN*) DLTTRC(*YES)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command formats and prints the trace data contained in database file members named T123456789 in library QGPL. The trace data members are removed after the trace data spooled file has been written. Only those traced jobs that were started under user profile QSYS and had job names that started with "QCMN" will be part of the trace listing.
|
||
|
</p>
|
||
|
<p><b>Example 3: Print Trace and Sort by Time</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
PRTTRC DTAMBR(MYTRACE) DTALIB(MYTRCLIB)
|
||
|
DLTTRC(*YES) SORT(*TIME)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command formats and prints the trace data contained in database file members named MYTRACE in library MYTRCLIB. The trace data members are removed after the trace data spooled file has been written. The trace records are sorted by the time the record was collected. If the traced jobs were multithreaded, the trace output is sorted by job, with all threads in that job sorted by time. The resulting output may have trace information for multiple threads intermingled.
|
||
|
</p>
|
||
|
<p><b>Example 4: Print Trace to an Output File</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
PRTTRC DTAMBR(BIGTRACE) DTALIB(TRACELIB) DLTTRC(*YES)
|
||
|
OUTPUT(*OUTFILE) OUTFILE(MYLIB/MYFILE)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command stores the trace data contained in database file members named BIGTRACE in library TRACELIB into a database output file named MYFILE in library MYLIB. The trace data members named BIGTRACE are removed after the trace data has been written to the database output file.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="PRTTRC.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF39CD</b></dt>
|
||
|
<dd>Error occurred during processing of the PRTTRC command.
|
||
|
</dd>
|
||
|
<dt><b>CPF98A2</b></dt>
|
||
|
<dd>Not authorized to &1 command.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#PRTTRC.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|