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

171 lines
4.1 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>netdir_sperror()--Indicate an Error in an NTA Routine</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 -->
<!-- RPCMST SCRIPT A converted by B2H R4.1 (346) (CMS) by PMHALL at -->
<!-- RCHVMW2 on 7 Oct 1998 at 23:43:14 -->
<!-- Edited by Kersten Feb 02 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<a name="Top_Of_Page"></a>
<h2>netdir_sperror()--Indicate an Error in an NTA Routine</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Syntax<br>
<!-- iddvc RMBR -->
<br>
<pre>
#include &lt;netdir.h&gt;
void netdir_sperror();
</pre>
<br>
&nbsp;&nbsp;Service Program Name: QZNFTRPC<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The <strong>netdir_sperror()</strong> function issues an informational
message that states why one of the name-to-address translation APIs may have
failed.</p>
<br>
<h3>Parameters</h3>
<p>None.</p>
<br>
<h3>Authorities</h3>
<p>No authorization is required.</p>
<br>
<h3>Return Value</h3>
<p>None</p>
<p><strong>netdir_sperror()</strong> issues an informational message that
indicates the error in one of the name-to-address translation APIs.</p>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td width="15%" valign="top">CPIA1B7</td>
<td width="85%" valign="top">The previous name-to-address translation has
completed.</td>
</tr>
</table>
<br>
<br>
<h3>Usage Notes</h3>
<p>The <strong>netdir_sperror()</strong> function issues CPIA1B7 message that
indicates why one of the name-to-address translation mapping APIs failed. This
function should be used after a failed call to a name-to-address translation
function prior to calling another name-to-address translation function.</p>
<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 example shows how <strong>netdir_sperror()</strong> is
used:</p>
<pre>
#include &lt;netdir.h&gt;
#include &lt;rpc/rpc_com.h&gt;
main()
{
void *handlep;
struct netconfig *nconf;
/* Initialize the network selection mechanism */
if (handlep = setnetconfig()) == (void *)NULL)
{
exit(1);
}
/* Get a netconfig structure from the netconfig file */
if ((nconf = getnetconfig(handlep)) == (struct netconf *)NULL)
{
printf(&quot;Unable to obtain a netconfig structure\n&quot;);
}
/* Set the protocol specific negotiation for broadcast */
if (netdir_options(nconf, ND_SET_BROADCAST, RPC_ANYSOCK, NULL))
{
printf(&quot;Error setting the broadcasting option\n&quot;);
printf(&quot;See the job log for error message\n&quot;);
netdir_sperror();
}
/* Release the netconfig handle allocated by setnetconfig() */
endnetconfig(handlep);
}
</pre>
<br>
<hr>
API introduced: V4R2
<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=
"rpc1.htm">Remote Procedure Call (RPC) APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</body>
</html>