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

1592 lines
55 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0072)https://w3.rchland.ibm.com/projects/api-cl/api/templates/iletemplate.htm -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>QP0LROR</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 -->
<!-- WARNING: Do not change "&amp;path" and "&amp;errorCode" to "&path" and "&errorCode". -->
<!-- This causes CHKPII errors.... -->
<!-- file cleaned -->
<!-- Created by Jerry Von Berge for V5R2 -->
<!-- Change History: -->
<!-- 011022 JTROUS Changes from API Review 1, V5R2 -->
<!-- 0206?? JET: This file has undergone html cleanup -->
<!-- 021211 JTROUS: Fix IFS capitilizations, no change flags -->
<!-- 030326 JTROUS: Add link to new QP0LROR, V5R3 -->
<!-- 040225 mfenlon: Add netserver session info -->
<!-- 050503 VONBERGE: Change threadsafety to No -->
<!-- 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>Retrieve Object References (QP0LROR)</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax<br>
<pre>
#include &lt;qp0lror.h&gt;
void QP0LROR(
void * Receiver_Ptr,
unsigned int Receiver_Length,
char * Format_Ptr,
Qlg_Path_Name_T * Path_Ptr,
void * Error_Code_Ptr
<br>
);
</pre>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
<img src="delta.gif" alt="Start of change">
&nbsp;&nbsp;Threadsafe: No
<img src="deltaend.gif" alt="End of change">
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>QP0LROR()</strong> API is used to retrieve information about
integrated file system references on an object.</p>
<p>A reference is an individual type of access or lock obtained on the object
when using integrated file system interfaces. An object may have multiple
references concurrently held, provided that the reference types do not conflict
with one another.</p>
<p>This API will not return information about byte range locks that may
currently be held on an object.</p>
<br>
<h3>Parameters</h3>
<dl>
<dt><strong>Receiver_Ptr</strong></dt>
<dd>(Output)
<p>The variable that is to receive the information requested. You can specify
the size of this area to be smaller than the format requested as long as you
specify the length parameter correctly. As a result, the API returns only the
data that the area can hold.</p>
<p>The format of the output is described by either the RORO0100 output format
or the RORO0200 output format. See <a href="#objref1">RORO0100 Output Format
Description</a> or the <a href="#objref2">RORO0200 Output Format
Description</a> for a detailed description of these output formats.</p>
</dd>
<dt><strong>Receiver_Length</strong></dt>
<dd>(Input)
<p>The length of the receiver variable. If the length is larger than the size
of the receiver variable, the results may not be predictable. The minimum
length is 8 bytes.</p>
</dd>
<dt><strong>Format_Ptr</strong></dt>
<dd>(Input)
<p>Pointer to a 8 byte character string that identifies the desired output
format. It must be one of the following values:</p>
<dl>
<dt><strong>RORO0100</strong></dt>
<dd>The reference type output will be formatted in a RORO0100 format. See <a
href="#objref1">RORO0100 Output Format Description</a>. This format gives the
caller a quick view of the object's references.</dd>
<dt><strong>RORO0200</strong></dt>
<dd>The reference type output will be formatted in a RORO0200 format. See <a
href="#objref2">RORO0200 Output Format Description</a>. Specifying this format
may cause QP0LROR to be a long running operation. The length of time it will
take to complete depends on the number of jobs active on the system, and the
number of jobs currently using objects through integrated file system
interfaces.<br>
<br>
</dd>
</dl>
</dd>
<dt><strong>Path_Ptr</strong></dt>
<dd>(Input)
<p>Pointer to the path name to the object whose reference information is to be
obtained. The path name must be specified in an NLS-enabled format specified by
the Qlg_Path_Name structure. For more information on the Qlg_Path_Name_T
structure, see <a href="../apiref/pns.htm">Path name format</a>.</p>
</dd>
<dd><br>
<br>
<p>If the last element of the <em>path</em> is a symbolic link, the <strong>
Qp0lROR()</strong> function does not resolve the contents of the symbolic link.
The reference information will be obtained for the symbolic link itself.</p>
</dd>
<dt><strong>Error_Code_Ptr</strong></dt>
<dd>(Input/Output)
<p>Pointer to an error code structure to receive error information. See <a
href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a> for more information.</p>
</dd>
</dl>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><strong>Directory Authority</strong></dt>
<dd>The user must have execute (*X) data authority to each directory preceding
the object whose references are to be obtained.<br>
<br>
</dd>
<dt><strong>Object Authority</strong></dt>
<dd>The user must have read (*R) data authority to the object whose references
are to be obtained.</dd>
</dl>
<br>
<h3><a name="structureheader">Output Structure Formats</a></h3>
<h3><a name="objref1">RORO0100 Output Format Description
(<em>Qp0l_RORO0100_Output</em>)</a></h3>
<p>This structure is used to return object reference information.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Bytes Returned</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Bytes Available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Offset to Simple Reference Types</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Length of Simple Reference Types</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Reference Count</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">In-Use Indicator</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from <em>Offset to
Simple Reference Types</em> field</td>
<td align="left" valign="top">Qp0l_Sim_Ref_Types_Output Structure</td>
<td align="left" valign="top">Simple Reference Types Structure. See <a href=
"#SimObjTypesStruct">Simple Object Reference Types Structure Description</a>
for a description of this structure.</td>
</tr>
</table>
<br>
<h3><a name="objref2">RORO0200 Output Format Description
(<em>Qp0l_RORO0200_Output</em>)</a></h3>
<p>This output format is used to return object reference information, including
a list of jobs known to be referencing the object. This includes everything
from the RORO0100 structure plus additional information.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Bytes Returned</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Bytes Available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Reference Count</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">In-Use Indicator</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Offset to Simple Reference Types</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Length of Simple Reference Types</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Offset to Extended Reference
Types</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Length of Extended Reference
Types</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Offset to Job List</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Jobs Returned</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Jobs Available</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from
<em>Offset to Simple Reference Types</em> field</td>
<td align="left" valign="top">Qp0l_Sim_Ref_Types_Output Structure</td>
<td align="left" valign="top">Simple Reference Types Structure See <a href=
"#SimObjTypesStruct">Simple Object Reference Types Structure Description</a>
for a description of this structure.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from
the <em>Offset to Extended Reference Types</em> field</td>
<td align="left" valign="top">Qp0l_Ext_Ref_Types_Output Structure</td>
<td align="left" valign="top">Extended Reference Types Structure. See <a href=
"#ObjTypesStruct">Extended Object Reference Types Structure Description</a> for
a description of this structure. The reference counts contained within this
structure represent the number of references for all jobs in the job list.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from
<em>Offset to Job List</em> field</td>
<td align="left" valign="top" colspan="1">Qp0l_Job_Using_Object Structure</td>
<td align="left" valign="top" colspan="1">Referencing job list. The <a href=
"#JobListStruct">Job Using Object Structure</a> will be repeated for each
job.</td>
</tr>
</table>
<br>
<h3><a name="JobListStruct">Job Using Object Structure Description
(<em>Qp0l_Job_Using_Object</em>)</a></h3>
<p>This structure is imbedded within the RORO0200 format. It is used to return
information about a job that is known to be holding a reference on the
object.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Displacement to Simple Reference
Types</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Length of Simple Reference Types</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Displacement to Extended Reference
Types</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Length of Extended Reference
Types</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Displacement to Next Job Entry</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Job Name</td>
</tr>
<tr>
<td align="center" valign="top">30</td>
<td align="center" valign="top">1E</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Job User</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="left" valign="top">CHAR(6)</td>
<td align="left" valign="top">Job Number</td>
</tr>
<tr>
<td align="center" valign="top"><img src="delta.gif" alt="Start of change">46</td>
<td align="center" valign="top">2E</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">Reserved (Binary 0)
</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Displacement to iSeries NetServer Session List
</td>
</tr>
<tr>
<td align="center" valign="top">52</td>
<td align="center" valign="top">34</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">iSeries NetServer Sessions Returned
<img src="deltaend.gif" alt="End of change"></td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from
the <em>Displacement to Simple Reference Types</em> field</td>
<td align="left" valign="top">Qp0l_Sim_Ref_Types_Output Structure</td>
<td align="left" valign="top">Simple Reference Types Structure. See <a href=
"#SimObjTypesStruct">Simple Object Reference Types Structure Description</a>
for a description of this structure.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Offset determined from
the <em>Displacement to Extended Reference Types</em> field</td>
<td align="left" valign="top">Qp0l_Ext_Ref_Types_Output Structure</td>
<td align="left" valign="top">Extended Reference Types Structure. See <a href=
"#ObjTypesStruct">Extended Object Reference Types Structure Description</a> for
a description of this structure. The reference counts contained within this
structure represent the number of references for this specific job.</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2"><img src="delta.gif" alt="Start of change">
Offset determined from the <em>Displacement to iSeries NetServer Session List</em> field</td>
<td align="left" valign="top">Qp0l_Session_Using_Object Structure</td>
<td align="left" valign="top">iSeries NetServer Session Using Object Structure. See <a href=
"#SessionIdStruct">iSeries NetServer Session Using Object Structure Description</a> for
a description of this structure. The information within this
structure represent the iSeries NetServer sessions which have a reference to the
object.<img src="deltaend.gif" alt="End of change"></td>
</tr></table>
<br>
<br>
<h3><a name="SimObjTypesStruct">Simple Object Reference Types Structure
Description (<em>Qp0l_Sim_Ref_Types_Output</em>)</a></h3>
<p>This structure is imbedded within the RORO0100 and RORO0200 formats. It is
used to return object reference type information.</p>
<p>Each binary field reference type will be set to either 0 or a positive value
that represents the number of references for that type. This number will have
different meanings depending on the structure it is imbedded within. When this
structure is imbedded within a RORO0100 output, or imbedded within the header
portion of the RORO0200 output, then these values represent the number of known
references of this type. When this structure is imbedded within a specific job
list entry, then these values represent the number of references for that
specific type within that specific job itself.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Read Only</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Write Only</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read/Write</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Share with neither Readers nor Writers</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Attribute Lock</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Save Lock</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Internal Save Lock</td>
</tr>
<tr>
<td align="center" valign="top">44</td>
<td align="center" valign="top">2C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Link Changes Lock</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Checked Out</td>
</tr>
<tr>
<td align="center" valign="top">52</td>
<td align="center" valign="top">34</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Checked Out User Name</td>
</tr>
<tr>
<td align="center" valign="top">62</td>
<td align="center" valign="top">3E</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">Reserved (Binary 0)</td>
</tr>
</table>
<br>
<br>
<h3><a name="ObjTypesStruct">Extended Object Reference Types Structure
Description (<em>Qp0l_Ext_Ref_Types_Output</em>)</a></h3>
<p>This structure is imbedded within the RORO0200 format. It is used to return
object reference type information.</p>
<p>Each binary field reference type will be set to either 0 or a positive value
that represents the number of references for that type. This number will have
different meanings depending on the structure it is imbedded within. When this
structure is imbedded within the header portion of the RORO0200 output, then
these values represent the number of jobs in the job list that contains a
reference of this type. When this structure is imbedded within a specific job
list entry, then these values represent the number of references for that
specific type within that specific job itself.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Read Only, Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read Only, Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read Only, Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read Only, Share with neither Readers nor
Writers</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Write Only, Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Write Only, Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Write Only, Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Write Only, Share with neither Readers nor
Writers</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read/Write, Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read/Write, Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">40</td>
<td align="center" valign="top">28</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read/Write, Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">44</td>
<td align="center" valign="top">2C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Read/Write, Share with neither Readers nor
Writers</td>
</tr>
<tr>
<td align="center" valign="top">48</td>
<td align="center" valign="top">30</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute, Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">52</td>
<td align="center" valign="top">34</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute, Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">56</td>
<td align="center" valign="top">38</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute, Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">60</td>
<td align="center" valign="top">3C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute, Share with neither Readers nor
Writers</td>
</tr>
<tr>
<td align="center" valign="top">64</td>
<td align="center" valign="top">40</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute/Read, Share with Readers Only</td>
</tr>
<tr>
<td align="center" valign="top">68</td>
<td align="center" valign="top">44</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute/Read, Share with Writers Only</td>
</tr>
<tr>
<td align="center" valign="top">72</td>
<td align="center" valign="top">48</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute/Read, Share with Readers and Writers</td>
</tr>
<tr>
<td align="center" valign="top">76</td>
<td align="center" valign="top">4C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Execute/Read, Share with neither Readers nor
Writers</td>
</tr>
<tr>
<td align="center" valign="top">80</td>
<td align="center" valign="top">50</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Attribute Lock</td>
</tr>
<tr>
<td align="center" valign="top">84</td>
<td align="center" valign="top">54</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Save Lock</td>
</tr>
<tr>
<td align="center" valign="top">88</td>
<td align="center" valign="top">58</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Internal Save Lock</td>
</tr>
<tr>
<td align="center" valign="top">92</td>
<td align="center" valign="top">5C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Link Changes Lock</td>
</tr>
<tr>
<td align="center" valign="top">96</td>
<td align="center" valign="top">60</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Current Directory</td>
</tr>
<tr>
<td align="center" valign="top">100</td>
<td align="center" valign="top">64</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Root Directory</td>
</tr>
<tr>
<td align="center" valign="top">104</td>
<td align="center" valign="top">68</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">File Server Reference</td>
</tr>
<tr>
<td align="center" valign="top">108</td>
<td align="center" valign="top">6C</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">File Server Working Directory</td>
</tr>
<tr>
<td align="center" valign="top">112</td>
<td align="center" valign="top">70</td>
<td align="left" valign="top">BINARY(4), UNSIGNED</td>
<td align="left" valign="top">Checked Out</td>
</tr>
<tr>
<td align="center" valign="top">116</td>
<td align="center" valign="top">74</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Checked Out User Name</td>
</tr>
<tr>
<td align="center" valign="top">126</td>
<td align="center" valign="top">7E</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">Reserved (Binary 0)</td>
</tr>
</table>
<br>
<br>
<h3><img src="delta.gif" alt="Start of change"><a name="SessionIdStruct">iSeries NetServer
Session Using Object Structure Description (
<em>Qp0l_Session_Using_Object Structure</em>)</a></h3>
<p>This structure is imbedded within the RORO0200 format. It is
used to return information for sessions having a reference.</p>
<p><strong>Note:</strong> iSeries NetServer refers to
iSeries Support for Windows Network Neighborhood.</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%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="30%">BINARY(8), UNSIGNED</td>
<td align="left" valign="top" width="50%">Session identifier</td>
</tr>
<tr>
<td align="center" valign="top" width="10%">8</td>
<td align="center" valign="top" width="10%">8</td>
<td align="left" valign="top" width="30%">BINARY(4), UNSIGNED</td>
<td align="left" valign="top" width="50%">Displacement to Next
iSeries NetServer Session Entry</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">0C</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">User Name</td>
</tr>
<tr>
<td align="center" valign="top">22</td>
<td align="center" valign="top">16</td>
<td align="left" valign="top">CHAR(15)</td>
<td align="left" valign="top">Workstation Name</td>
</tr>
<tr>
<td align="center" valign="top">37</td>
<td align="center" valign="top">25</td>
<td align="left" valign="top">CHAR(45)</td>
<td align="left" valign="top">Workstation Address</td>
</tr>
<tr>
<td align="center" valign="top">82</td>
<td align="center" valign="top">52</td>
<td align="left" valign="top">CHAR(14)</td>
<td align="left" valign="top">Reserved (Binary 0)<img src="deltaend.gif" alt="End of change"></td>
</tr>
</table>
<br>
<h3><a name="roroutfields">Field Descriptions for RORO0100 and RORO0200 Output
Structures and their Imbedded Structures</a></h3>
<p><strong>Attribute Lock.</strong> Attribute changes are prevented.</p>
<p><strong>Bytes Available.</strong> Number of bytes of output data that was
available to be returned.</p>
<p><strong>Bytes Returned.</strong> Number of bytes returned in the output
buffer.</p>
<p><strong>Checked Out.</strong> Indicates whether the object is currently
checked out. If it is checked out, then the <em>Checked Out User Name</em>
contains the name of the user who has it checked out.</p>
<p><strong>Checked Out User Name.</strong> Contains the name of the user who
has the object checked out, when the <em>Checked Out</em> field indicates that
it is currently checked out. This field is set to blanks (x'40) if the object
is not checked out.</p>
<p><strong>Current Directory.</strong> The object is a directory that is being
used as the current directory of the job.</p>
<p><strong>Displacement to Extended Reference Types.</strong> Displacement from
the beginning of the structure containing this field to the beginning of the
Extended Reference Types structure. If this field is 0, then no extended
reference types were available to be returned, or not enough space was provided
to include any portion of the Extended Reference Types structure.</p>
<p><img src="delta.gif" alt="Start of change"><strong>Displacement
to iSeries NetServer Session List.</strong>
Displacement from the
beginning of the structure containing this field to the first iSeries NetServer
Session Using Object structure. If this field is 0, then there are no sessions
in the list. If the File Server Reference and the File Server Working Directory
fields are set to 0, then this field will be set to 0.
<img src="deltaend.gif" alt="End of change"></p>
<p><img src="delta.gif" alt="Start of change"><strong>Displacement
to Next iSeries NetServer Session Entry.</strong> Displacement from the
beginning of the structure containing this field to the beginning of the next
iSeries NetServer Session Using Object structure. If this field is 0, then there
are no more sessions in the list.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>Displacement to Next Job Entry.</strong> Displacement from the
beginning of the structure containing this field to the beginning of the next
Job Using Object structure. If this field is 0, then there are no more jobs in
the list, or not enough space was provided to include any more Job Using Object
structures.</p>
<p><strong>Displacement to Simple Reference Types.</strong> Displacement from
the beginning of the structure containing this field to the beginning of the
Simple Reference Type structure. If this field is 0, then no simple reference
types were available to be returned, or not enough space was provided to
include any portion of the Simple Reference Types structure.</p>
<p><strong>Execute.</strong> Execute only access.</p>
<p><strong>Execute, Share with Readers Only.</strong> Execute only access. The
sharing mode allows sharing with read and execute access intents only.</p>
<p><strong>Execute, Share with Readers and Writers.</strong> Execute only
access. The sharing mode allows sharing with read, execute, and write access
intents.</p>
<p><strong>Execute, Share with Writers Only.</strong> Execute only access. The
sharing mode allows sharing with write access intents only.</p>
<p><strong>Execute, Share with neither Readers nor Writers.</strong> Execute
only access. The sharing mode allows sharing with no other access intents.</p>
<p><strong>Execute/Read, Share with Readers Only.</strong> Execute and read
access. The sharing mode allows sharing with read and execute access intents
only.</p>
<p><strong>Execute/Read, Share with Readers and Writers.</strong> Execute and
read access. The sharing mode allows sharing with read, execute, and write
access intents.</p>
<p><strong>Execute/Read, Share with Writers Only.</strong> Execute and read
access. The sharing mode allows sharing with write access intents only.</p>
<p><strong>Execute/Read, Share with neither Readers nor Writers.</strong>
Execute and read access. The sharing mode allows sharing with no other access
intents.</p>
<p><strong>Extended Reference Types Structure.</strong> This is a
Qp0l_Ext_Ref_Types_Output structure containing fields that indicate different
types of references that may be held on an object. Some of these are actually a
grouping of multiple <strong>Simple Reference Types</strong> that were known to
have been specified by the referring instance. These are not additional
references; they are a redefinition of the same references described in the
Simple Reference Types structure.</p>
<p><strong>File Server Reference.</strong> The File Server is holding a generic
reference on the object on behalf of a client.
<img src="delta.gif" alt="Start of change">If this field is not 0, then
iSeries NetServer session information may have been returned.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>File Server Working Directory.</strong> The object is a directory,
and the File Server is holding a working directory reference on it on behalf of
a client.<img src="delta.gif" alt="Start of change"> If this field is not 0,
then iSeries NetServer session information may have been returned.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>In-Use Indicator</strong> The object is currently in-use. NOTE: This
indicator will be set to one of the following values:</p>
<dl>
<dt><strong>QP0L_OBJECT_NOT_IN_USE (0)</strong></dt>
<dd>The object is not in use and all of the reference type fields returned are
0.</dd>
<dt><strong>QP0L_OBJECT_IN_USE (1)</strong></dt>
<dd>The object is in use. At least one of the reference type fields is greater
than 0. This condition may occur even if the Reference Count field's value is
0.</dd>
</dl>
<p><strong>Internal Save Lock.</strong> The object is being referenced
internally during a save operation on a different object.</p>
<p><strong><img src="delta.gif" alt="Start of change">iSeries NetServer
Sessions Returned.</strong> The number of iSeries NetServer Session Using Object
structures returned for the job.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>Job Name.</strong> Name of the job.</p>
<p><strong>Job Number.</strong> Number associated with the job.</p>
<p><strong>Job User.</strong> User profile associated with the job.</p>
<p><strong>Jobs Available.</strong> Number of referencing jobs available. This
may be greater than the <strong>Jobs Returned</strong> field when the caller
did not provide enough space to receive all of the job information.</p>
<p><strong>Jobs Returned.</strong> Number of referencing jobs returned in the
job list.</p>
<p><strong>Length of Extended Reference Types.</strong> Length of the Extended
Reference Types information.</p>
<p><strong>Length of Simple Reference Types.</strong> Length of the Simple
Reference Types information.</p>
<p><strong>Link Changes Lock.</strong> Changes to links in the directory are
prevented.</p>
<p><strong>Offset to Extended Reference Types.</strong> Offset from the
beginning of the <em>Receiver_Ptr</em> to the beginning of the Extended
Reference Types structure. If this field is 0, then no extended reference types
were available to be returned, or not enough space was provided to include any
portion of the Extended Reference Types structure.</p>
<p><strong>Offset to Job List.</strong> Offset from the beginning of the <em>
Receiver_Ptr</em> to the beginning of the first Job Using Object structure. If
this field is 0, then there are no jobs in the list.</p>
<p><strong>Offset to Simple Reference Types.</strong> Offset from the beginning
of the <em>Receiver_Ptr</em> to the beginning of the Simple Reference Type
structure. If this field is 0, then no simple reference types were available to
be returned, or not enough space was provided to include any portion of the
Simple Reference Types structure.</p>
<p><strong>Read Only.</strong> Read only access.</p>
<p><strong>Read Only, Share with Readers Only.</strong> Read only access. The
sharing mode allows sharing with read and execute access intents only.</p>
<p><strong>Read Only, Share with Readers and Writers.</strong> Read only
access. The sharing mode allows sharing with read, execute, and write access
intents.</p>
<p><strong>Read Only, Share with Writers Only.</strong> Read only access. The
sharing mode allows sharing with write access intents only.</p>
<p><strong>Read Only, Share with neither Readers nor Writers.</strong> Read
only access. The sharing mode allows sharing with no other access intents.</p>
<p><strong>Read/Write.</strong> Read and write access.</p>
<p><strong>Read/Write, Share with Readers Only.</strong> Read and write access.
The sharing mode allows sharing with read and execute access intents only.</p>
<p><strong>Read/Write, Share with Readers and Writers.</strong> Read and write
access. The sharing mode allows sharing with read, execute, and write access
intents.</p>
<p><strong>Read/Write, Share with Writers Only.</strong> Read and write access.
The sharing mode allows sharing with write access intents only.</p>
<p><strong>Read/Write, Share with neither Readers nor Writers.</strong> Read
and write access. The sharing mode allows sharing with no other access
intents.</p>
<p><strong>Reference Count.</strong> Current number of references on the
object. NOTE: This may be 0 even though the In-Use Indicator indicates that the
object is in use.</p>
<p><strong>Referencing Job List.</strong> Variable length list of
Qp0l_Job_Using_Object structures for jobs that are currently referencing the
object.</p>
<p><strong>Root Directory.</strong> The object is a directory that is being
used as the root directory of the job.</p>
<p><strong>Save Lock.</strong> The object is being referenced by an object save
operation.</p>
<p><img src="delta.gif" alt="Start of change">
<strong>Session identifier.</strong> Unique identifier for the iSeries
NetServer session.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>Share with Readers Only.</strong> The sharing mode allows sharing
with read and execute access intents only.</p>
<p><strong>Share with Readers and Writers.</strong> The sharing mode allows
sharing with read, execute, and write access intents.</p>
<p><strong>Share with Writers Only.</strong> The sharing mode allows sharing
with write access intents only.</p>
<p><strong>Share with neither Readers nor Writers.</strong> The sharing mode
allows sharing with no other access intents.</p>
<p><strong>Simple Reference Types Structure.</strong> This is a
Qp0l_Sim_Ref_Types_Output structure containing fields that indicate different
types of references that may be held on an object.</p>
<p><img src="delta.gif" alt="Start of change">
<strong>User name.</strong> The name of the user that is associated with
the iSeries NetServer session.
<img src="deltaend.gif" alt="End of change"></p>
<p><img src="delta.gif" alt="Start of change">
<strong>Workstation address.</strong> The IP address of the workstation from which
the iSeries NetServer session to the server was established. If this information
is not available, this field will be set to blanks.
<img src="deltaend.gif" alt="End of change"></p>
<p><img src="delta.gif" alt="Start of change">
<strong>Workstation name.</strong> The name of the workstation from which the
iSeries NetServer session to the server was established. If this information
is not available, this field will be set to blanks.
<img src="deltaend.gif" alt="End of change"></p>
<p><strong>Write Only.</strong> Write only access.</p>
<p><strong>Write Only, Share with Readers Only.</strong> Write only access. The
sharing mode allows sharing with read and execute access intents only.</p>
<p><strong>Write Only, Share with Readers and Writers.</strong> Write only
access. The sharing mode allows sharing with read, execute, and write access
intents.</p>
<p><strong>Write Only, Share with Writers Only.</strong> Write only access. The
sharing mode allows sharing with write access intents only.</p>
<p><strong>Write Only, Share with neither Readers nor Writers.</strong> Write
only access. The sharing mode allows sharing with no other access intents.</p>
<br>
<h3>Error Messages</h3>
<table width="100%">
<tr>
<td align="left" valign="top" width="15%">CPF3C21 E</td>
<td align="left" valign="top" width="85%">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C24 E</td>
<td align="left" valign="top">Length of the receiver variable is
not valid.</td>
</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">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in
library &amp;2 ended. Reason code &amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPFA0D4 E</td>
<td align="left" valign="top">File system error occurred. Error
number &amp;1.</td>
</tr>
</table>
<br>
<br>
<h3>Usage Notes</h3>
<ol type="1">
<li>Since both available formats are variable length, following are the
recommended minimum lengths pertaining to their corresponding formats:
<ul>
<li>RORO0100: The size of a RORO0100 Output structure plus the size of a <em>
Simple Reference Types</em> structure.</li>
<li>RORO0200: This structure varies dynamically, and therefore there is no
formula that can yield a size large enough to always retrieve all of the
available information. However, programs may consider first calling QP0LROR
with the RORO0100 format. This will quickly return the number of references
currently on the object. Then the program could allocate a buffer equal in size
to: size of a <em>Job Using Object</em> structure (including the size of
<img src="delta.gif" alt="Start of change">the
Simple and Extended Reference Type structures and the iSeries NetServer Session
Using Object structure<img src="deltaend.gif" alt="End of change">)
multiplied by the number of
references, and then add the sizes of a RORO0100 output, RORO0200 output, and
Simple Reference Types structures. Now the program could call QP0LROR with the
RORO0200 format requested and the computed size.
<p>If the RORO0200 format was specified, but there was not enough space
provided to receive a complete list of job information, then only those job
entries that completely fit in the buffer will be returned. The RORO0200 output
structure contains a field called <em>JobsAvailable</em> that will always
contain the total number of referencing jobs that were available for returning
to the caller at that instance in time.</p>
</li>
</ul>
<p><strong>Notes</strong></p>
<ul>
<li>There are no locks obtained on the object while this API is running.
Therefore, when this API is used on an object that is actively in use (e.g.,
its lock and reference state is changing while this API is running), some
fields in the returned information may be inconsistent with other fields
returned on the same invocation of QP0LROR.</li>
<li>The number of references on the object may change between multiple calls to
this API. Therefore, the above formula for calculating output buffer size for a
RORO0200 format may not be enough space under all conditions.</li>
<li>There are some reference types that are obtained on the object without
incrementing the object's reference count. This could result in a reference
count of zero while the object contains reference types. In this instance, the
above formula for calculating output buffer size for a RORO0200 format may not
be enough space.</li>
</ul>
</li>
<li>The list of simple object reference types in the base portions of the
RORO0100 and RORO0200 output structures may not contain complete information
for objects residing in file systems other than the "root" (/), QOpenSys, and
user-defined file systems. The simple reference types will, however, be set in
the job array elements in the RORO0200 output structure for any file
system.</li>
<li>The list of object reference types in the RORO0200 output formats may be an
incomplete list of references for objects residing in file systems other than
the "root" (/), QOpenSys, and user-defined file systems. Objects in some of the
other file systems can be locked with interfaces that do not use the integrated
file system. Therefore, references returned by this API will only be references
that were obtained as part of an integrated file system operation, or an
operation that cause the integrated file system operation to occur.</li>
<li>Under some circumstances, the list of jobs that are referencing the object
may be incomplete. However, jobs not listed in the job list may still have
their references listed in the RORO0100 output. This occurs when system
programs obtain references directly on an object without obtaining an open
descriptor for the object.</li>
<li>At some instances during the save or restore of an integrated file system
object, the object may have references held by the job even though its
reference count is 0.</li>
<li>The Network File System (NFS) will only be returning
references that are locally obtained on the object. Any references that the
remote system may have on the remote object are not returned by this API.</li>
<li>Use of this API on an object accessed via the QFileSvr.400 file system will
not return any job references, even if the object was opened using the
QFileSvr.400 client.</li>
<li>This type of reference information is also viewable through the iSeries
Navigator application. The terminology, however, differs in that iSeries
Navigator refers to this type of information as "Usage" information instead of
"Reference" information.</li>
</ol>
<br>
<h3>Related Information</h3>
<ul>
<li>The &lt;<strong>qp0lror.h</strong>&gt; file (see <a href="unix13.htm">
Header Files for UNIX-Type Functions</a>)</li>
<li><a href="qp0lrro.htm">Retrieve Referenced Objects (QP0LRRO) API</a></li>
</ul>
<br>
<h3>Example</h3>
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
for information pertaining to code examples.</p>
<p>The following is an example use of this API.</p>
<pre>
#include &lt;qp0lror.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;stdlib.h&gt;
void main()
{
struct PathNameStruct
{
Qlg_Path_Name_T header;
char p[50];
};
struct PathNameStruct path;
char pathName[] = "/CustomerData";
Qus_EC_t errorCode;
/* Define a constant for the number of output buffer bytes
provided for the RORO0100 format. */
#define OUTPUT_BYTES_RORO0100 \
(sizeof(Qp0l_RORO0100_Output_T) + \
sizeof(Qp0l_Sim_Ref_Types_Output_T) + \
100) /* Pad space for potential gap between
the 2 structures. */
/* Declare some space for the RORO0100 output. */
char output100Buf[OUTPUT_BYTES_RORO0100];
/* Declare a pointer for retrieving the RORO0100 format. */
Qp0l_RORO0100_Output_T *output100P;
/* Declare a pointer to retrieve the RORO0200 format. */
Qp0l_RORO0200_Output_T *output200P;
/* Declare a job using object pointer. */
Qp0l_Job_Using_Object_T *jobP;
unsigned outputBufSize;
/* Set output buffer pointer and length for retrieving the
RORO0100 format. */
output100P = (Qp0l_RORO0100_Output_T *)output100Buf;
/* Setup the object's path name structure. */
memset(&amp;path, 0, sizeof(path));
path.header.CCSID = 37;
memcpy(path.header.Country_ID,"US",2);
memcpy(path.header.Language_ID,"ENU",3);
path.header.Path_Type = QLG_CHAR_SINGLE;
path.header.Path_Length = strlen(pathName);
path.header.Path_Name_Delimiter[0] = '/';
memcpy(path.p, pathName, path.header.Path_Length);
/* Setup the error code structure to cause the error to be
returned within the error structure. */
errorCode.Bytes_Provided = sizeof(errorCode);
errorCode.Bytes_Available = 0;
/* First call QP0LROR to get the short format. We will
use that information about references to conditionally
allocate more space and then get the longer
running format's information. */
QP0LROR(output100P,
OUTPUT_BYTES_RORO0100,
QP0LROR_RORO0100_FORMAT,
(Qlg_Path_Name_T *) &amp;path,
&amp;errorCode);
/* Check if an error occurred. */
if (errorCode.Bytes_Available != 0)
{
printf("Error occurred for RORO0100.\n");
return;
}
/* Check if we received any references that might be
associated with a job. If not, return. */
if (output100P-&gt;Count == 0)
{
printf("QP0LROR returned a reference count of %d\n",
output100P-&gt;Count);
return;
}
/* If we get here, then we have at least 1 reference that
may be identifiable to a job. We will call the
QP0LROR API to get the RORO0200 format. First we
compute a buffer size to use. Note: this calculation
sums up the sizes of all structures contained within
the RORO0200 format, but doesn't consider gaps between
each of the structure. To attempt to cover potential
gaps between structures, an extra 1000 bytes is being
allocated and room for 10 additional jobs. */
outputBufSize =
sizeof(Qp0l_RORO0200_Output_T) +
sizeof(Qp0l_Sim_Ref_Types_Output_T) +
sizeof(Qp0l_Ext_Ref_Types_Output_T) +
((output100P-&gt;Count + 10) *
(sizeof(Qp0l_Job_Using_Object_T) +
sizeof(Qp0l_Sim_Ref_Types_Output_T) +
sizeof(Qp0l_Ext_Ref_Types_Output_T)
) + 1000
);
if (NULL == (output200P =
(Qp0l_RORO0200_Output_T *)malloc(outputBufSize)))
{
printf("No space available.\n");
return;
}
/* Retrieve object references. */
QP0LROR(output200P,
outputBufSize,
QP0LROR_RORO0200_FORMAT,
(Qlg_Path_Name_T *) &amp;path,
&amp;errorCode);
/* Check if an error occurred. */
if (errorCode.Bytes_Available != 0)
{
free(output200P);
printf("Error occurred for RORO0200.\n");
return;
}
/* If there was more information available than we had
provided receiver space for, then we will allocate a
larger buffer and try once again. This could potentially
keep reoccurring, but this example will stop after this
second retry. */
if (output200P-&gt;BytesReturned &lt; output200P-&gt;BytesAvailable)
{
/* Use the bytes available value to determine how much
more buffer size is needed. We will pad it with an
extra 1000 bytes to try and handle more jobs obtaining
references between calls to QP0LROR. */
outputBufSize = output200P-&gt;BytesAvailable + 1000;
if (NULL == (output200P = (Qp0l_RORO0200_Output_T *)
realloc((void *)output200P,
outputBufSize)))
{
printf("No space available.\n");
return;
}
QP0LROR(output200P,
outputBufSize,
QP0LROR_RORO0200_FORMAT,
(Qlg_Path_Name_T *) &amp;path,
&amp;errorCode);
/* Check if an error occurred. */
if (errorCode.Bytes_Available != 0)
{
free(output200P);
printf("Error occurred for RORO0200 (2nd call).\n");
return;
}
}
/* Print some output. */
printf("Reference count: %d\n",output200P-&gt;Count);
printf("Jobs returned: %d\n",output200P-&gt;JobsReturned);
if (output200P-&gt;JobsReturned &gt; 0)
{
jobP = (Qp0l_Job_Using_Object_T *)
((char *)output200P + output200P-&gt;JobsOffset);
printf("First job's name: %10.10s %10.10s %6.6s",
jobP-&gt;Name,
jobP-&gt;User,
jobP-&gt;Number);
}
free(output200P);
return;
}
</pre>
<p><strong>Example Output:</strong></p>
<pre>
Reference count: 1
Jobs returned: 1
First job's name: JOBNAME123 JOBUSER123 123456
</pre>
<hr>
API introduced: V5R2
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<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>
</center>
</body>
</html>