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

289 lines
8.2 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>_RSLOBJ()--Resolve to an i5/OS Object for i5/OS PASE</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. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- Created by V2DCIJB on 23 Nov 1999 -->
<!-- Edited by Kersten Jan 02 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>_RSLOBJ()--Resolve to an i5/OS Object for i5/OS PASE</h2>
<div class="box" style="width: 70%;">
<br>
&nbsp;&nbsp;Syntax
<pre>
#include &lt;as400_protos.h&gt;
int _RSLOBJ(ILEpointer *<em>sysptr</em>,
const char *<em>path</em>,
char *<em>objtype</em>);
int _RSLOBJ2(ILEpointer *<em>sysptr</em>,
unsigned short <em>type_subtype</em>,
const char *<em>objname</em>,
const char *<em>libname</em>);
</pre>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Library: Standard C Library (libc.a)<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<br>
<p><strong>Note:</strong> These functions can only be used in an i5/OS PASE
program. See <a href="../rzalf/rzalfintro.htm">i5/OS PASE</a> for more
information about creating i5/OS PASE programs.</p>
<p>The <strong>_RSLOBJ()</strong> and <strong>_RSLOBJ2()</strong> functions
resolve to an i5/OS object. They accept symbolic information that identifies
the object and return a 16-byte tagged system pointer to the specified
object.</p>
<h3>Parameters</h3>
<dl>
<dt><strong>sysptr</strong></dt>
<dd>(Output) Pointer to the i5/OS object. <em>sysptr</em> is the address of a
16-byte aligned buffer allocated by the caller and used to return a system
pointer to the i5/OS object.<br>
<br>
</dd>
<dt><strong>path</strong></dt>
<dd>(Input) Pointer to an Integrated File System path name that locates the
i5/OS object. <em>path</em> is the address of a null-terminated string in the
i5/OS PASE CCSID that contains a path name for the i5/OS object.</dd>
<dd><br>
<br>
</dd>
<dt><strong>objtype</strong></dt>
<dd>(Output) Pointer to the returned i5/OS object type. <em>objtype</em> is
the address of a buffer allocated by the caller and used to return a
null-terminated string in the i5/OS PASE CCSID that identifies the i5/OS
object type. If <em>objtype</em> is a null pointer, no i5/OS object type is
returned. When <em>objtype</em> is not null, the caller must provide a buffer
of length <strong>RSLOBJ_OBJTYPE_MAXLEN</strong> (11) to avoid errors.<br>
<br>
</dd>
<dt><strong>type_subtype</strong></dt>
<dd>(Input) Object type and subtype. <em>type_subtype</em> specifies the MI
object type and MI object subtype of the i5/OS object. Header file
&lt;as400_types.h&gt; declares these constants for type and subtype values:<br>
<br>
<table cellpadding="5">
<!-- cols="25 75" -->
<tr>
<td align="left" valign="top"><em>RSLOBJ_TS_PGM</em><br>
(0x0201)</td>
<td align="left" valign="top">Specifies the MI type and subtype for an i5/OS
program (object type *PGM).</td>
</tr>
<tr>
<td align="left" valign="top"><em>RSLOBJ_TS_SRVPGM</em><br>
(0x0203)</td>
<td align="left" valign="top">Specifies the MI type and subtype for an i5/OS
service program (object type *SRVPGM).</td>
</tr>
</table>
<br>
</dd>
<dt><strong>objname</strong></dt>
<dd>(Input) Pointer to the name of the i5/OS object. <em>objname</em> is the
address of a null-terminated string in the i5/OS PASE CCSID that contains the
name of the i5/OS object.<br>
<br>
</dd>
<dt><strong>libname</strong></dt>
<dd>(Input) Pointer to the name of the i5/OS library that contains the object.
<em>libname</em> is the address of a null-terminated string in the i5/OS PASE
CCSID that contains the name of an i5/OS library. Specifying a null pointer or
a pointer to a null string is the same as specifying "*LIBL", which searches
the thread library list.<br>
<br>
</dd>
</dl>
<br>
<h3>Authorities</h3>
<table border cellpadding="5">
<!-- cols="80 20" -->
<tr>
<th align="left" valign="bottom">Object Referred to</th>
<th align="center" valign="bottom">Authority<br>
Required</th>
</tr>
<tr>
<td align="left" valign="top">Every directory in the Integrated File System
path to the i5/OS object</td>
<td align="center" valign="top">*X</td>
</tr>
<tr>
<td align="left" valign="top">i5/OS library that contains the object</td>
<td align="center" valign="top">*X</td>
</tr>
</table>
<br>
<h3>Return Value</h3>
<p>The function result is zero if the i5/OS object was found and a system
pointer was returned in the <em>sysptr</em> argument. A function result of -1
indicates an error that is further qualified by an errno value.</p>
<br>
<h3>Error Conditions</h3>
<p>Memory errors may be reported with an i5/OS exception message that the
system converts to an i5/OS PASE signal (not return code and errno values).
See <a href="pase_signals.htm">i5/OS PASE Signal Handling</a> for information
about handling i5/OS exceptions.</p>
<p>At least these errno values can be returned, with other values also possible
(such as i5/OS-unique ILE errno EAPAR):</p>
<table cellpadding="5">
<!-- cols="25 75" -->
<tr>
<td align="left" valign="top"><em>[EACCES]</em></td>
<td align="left" valign="top">Not authorized to a library or directory needed
to resolve to the i5/OS object.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[EBUSY]</em></td>
<td align="left" valign="top">A library or directory needed to resolve to the
i5/OS object is currently in use (locked).<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[EFAULT]</em></td>
<td align="left" valign="top">A memory fault occurred attempting to reference
an argument.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[EINVAL]</em></td>
<td align="left" valign="top">An invalid argument value was specified.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[EINTER]</em></td>
<td align="left" valign="top">An signal interrupted the operation.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[ENAMETOOLONG]</em></td>
<td align="left" valign="top">Some component of the specified <em>path</em> is
too long, or the entire <em>path</em> exceeds the system limit, or the
<em>objname</em> or <em>libname</em> string is longer than 30 characters.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[ENOENT]</em></td>
<td align="left" valign="top">The specified i5/OS object was not found.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[ENOTDIR]</em></td>
<td align="left" valign="top">A qualifier part of the <em>path</em> is not a
directory.<br><br></td>
</tr>
<tr>
<td align="left" valign="top"><em>[ELOOP]</em></td>
<td align="left" valign="top">Too many levels of symbolic links.</td>
</tr>
</table>
<br>
<br>
<h3>Usage Notes</h3>
<ol>
<li>For <strong>_RSLOBJ</strong>, alphabetic case is either ignored or honored
depending on the attributes of the file system that contains the path.
Alphabetic case is always honored by <strong>_RSLOBJ2</strong>, so the
<em>objname</em> and <em>libname</em> strings must be uppercase.<br>
<br>
</li>
</ol>
<h3>Related Information</h3>
<ul>
<li><a href="pase__ileload.htm">_ILELOAD()--Load an ILE Bound Program for
i5/OS PASE</a><br>
<br>
</li>
<li><a href="pase__pgmcall.htm">_PGMCALL()--Call an i5/OS Program for i5/OS
PASE</a></li>
</ul>
<br>
<br>
<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=
"pase1.htm">i5/OS PASE APIs</a> | <a href="aplist.htm">APIs by category</a>
</td>
</tr>
</table>
</center>
</body>
</html>