409 lines
14 KiB
HTML
409 lines
14 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>QsyGetEIMHandle()--Get EIM Handle Connected For System</title>
|
|
<!-- (C) Copyright IBM Corporation, 2004 -->
|
|
<!-- 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. -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
<!-- Begin header records --><!-- Created by Carol Budnik on 17 July 2001 -->
|
|
</head>
|
|
<body>
|
|
<!-- End header records --><!--Java sync-link-->
|
|
<script type="text/javascript" language="javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<h2><img src="delta.gif" alt="Start of change">QsyGetEIMHandle()--Get EIM Handle Connected For System</h2>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- S Y N T A X / P A R M T A B L E -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
<div class="box" style="width: 80%;">
|
|
<br>
|
|
Syntax
|
|
|
|
<pre>
|
|
#include <qsyeimapi.h>
|
|
|
|
#include <eim.h>
|
|
|
|
int QsyGetEIMHandle(EimHandle * <em>eim</em>,,
|
|
EimRc * <em>eimrc</em>)
|
|
|
|
</pre>
|
|
Service Program Name: QSYS/QSYEIMAPI<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- D E S C R I P T I O N -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
<p>The <strong>QsyGetEIMHandle()</strong> function is used to allocate
|
|
an EimHandle structure that is connected to EIM.
|
|
The EIM host information used will be the <samp>ldapURL</samp> information
|
|
set by the eimSetConfiguration() API.
|
|
The connection information used will be the <samp>connectInfo</samp>
|
|
set by the QsySetEIMConnectInfo() API.
|
|
The EimHandle structure
|
|
should be passed on subsequent calls to other EIM operations.
|
|
When the handle is no longer needed, it should be
|
|
destroyed by calling <strong>eimDestroyHandle()</strong> function.</p>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- A U T H O R I T I E S A N D L O C K S -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl>
|
|
<dt><em>Authority required</em></dt>
|
|
|
|
<dd>*ALLOBJ and *SECADM special authorities</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- P A R A M E T E R S -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<h3>Parameters</h3>
|
|
|
|
<dl>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- eim -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>eim</strong> (Output)</dt>
|
|
|
|
<dd>
|
|
The pointer to an EIM handle to be returned. This handle is used as input
|
|
for other EIM APIs. The handle is temporary; you can use it only in the job
|
|
that created it.
|
|
<br><br></dd>
|
|
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- eimrc -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>eimrc</strong></dt>
|
|
|
|
<dd>(Input/Output)
|
|
|
|
<p>The structure in which to return error code information. If the return value
|
|
is not 0, eimrc is set with additional information. This parameter may be NULL.
|
|
For the format of the structure, see <a href="eimrc.htm">EimRC--EIM Return Code
|
|
Parameter</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- R E T U R N V A L U E -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<h3>Return Value</h3>
|
|
|
|
<p>The return value from the API. Following each return value is the list of
|
|
possible values for the messageCatalogMessageID field in the eimrc parameter
|
|
for that value.</p>
|
|
|
|
<dl>
|
|
<!-- ============================================================== -->
|
|
<!-- 0 -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>0</strong></dt>
|
|
|
|
<dd>Request was successful.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- EACCES -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>EACCES</strong></dt>
|
|
|
|
<dd>Access denied.<br>
|
|
<br>
|
|
<table cellpadding="5">
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_AUTH_ERR (7)</em></td>
|
|
<td align="left" valign="top">Insufficient authority for the operation.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- EBADDATA -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>EBADDATA (3028)</strong></dt>
|
|
|
|
<dd>eimrc is not valid.<br>
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- EBUSY -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>EBUSY (3029)</strong></dt>
|
|
|
|
<dd>Unable to allocate internal system object.<br>
|
|
<br>
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_NOLOCK (26)</em></td>
|
|
<td align="left" valign="top">Unable to allocate internal system object.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- ECONVERT -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>ECONVERT (3490)</strong></dt>
|
|
|
|
<dd>Data conversion error.<br>
|
|
<br>
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_DATA_CONVERSION (13)</em></td>
|
|
<td align="left" valign="top">Error occurred when converting data between code
|
|
pages.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- EINVAL -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>EINVAL (3021)</strong></dt>
|
|
|
|
<dd>Input parameter was not valid.<br>
|
|
<br>
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_SSL_REQ (42)</em></td>
|
|
<td align="left" valign="top">The system is configured to connect to a secure port.
|
|
EimSSLInfo is required.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_NOT_SECURE (32)</em></td>
|
|
<td align="left" valign="top">The system is not configured to connect to a
|
|
secure port. Connection type of EIM_CLIENT_AUTHENTICATION is
|
|
not valid..</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_URL_NOTLDAP (49)</em></td>
|
|
<td align="left" valign="top">URL does not begin with ldap.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_URL_NOHOST (47)</em></td>
|
|
<td align="left" valign="top">URL does not have a host.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- ENOMEM -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>ENOMEM (3460)</strong></dt>
|
|
|
|
<dd>Unable to allocate required space.<br>
|
|
<br>
|
|
|
|
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_NOMEM (27)</em></td>
|
|
<td align="left" valign="top">No memory available. Unable to allocate required
|
|
space.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- ENOSYS -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>ENOSYS (3470)</strong></dt>
|
|
|
|
<dd>System not configured.<br>
|
|
<br>
|
|
|
|
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_OS400_NOTSET_CONFIG (5007)</em></td>
|
|
<td align="left" valign="top">EIM connection information is not set for
|
|
this system. Run QsySetEIMConnectInfo() API and try the request again.</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_OS400_NOTSET_MASTER (5008)</em></td>
|
|
<td align="left" valign="top">EIM connection information is not set for
|
|
the master system. Run QsySetEIMConnectInfo() API and try the request
|
|
again.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<!-- ============================================================== -->
|
|
<!-- EUNKNOWN -->
|
|
<!-- ============================================================== -->
|
|
<dt><strong>EUNKNOWN (3474)</strong></dt>
|
|
|
|
<dd>Unexpected exception.<br>
|
|
<br>
|
|
|
|
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td align="left" valign="top"><em>EIMERR_UNKNOWN (44)</em></td>
|
|
<td align="left" valign="top">Unknown error or unknown system state.</td>
|
|
</tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- U S A G E N O T E S -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- R E L A T E D I N F O R M A T I O N -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<h3>Related Information</h3>
|
|
|
|
<ul>
|
|
<li><a href="qsyseteimconnectinfo.htm">QsyGetEIMConnectInfo()</a>--Get EIM
|
|
Connect Information<br></li>
|
|
|
|
<li><a href="qsyseteimconnectinfo.htm">QsySetEIMConnectInfo()</a>--Set EIM
|
|
Connect Information<br></li>
|
|
|
|
<li><a href="eimdestroyhandle.htm">eimDestroyHandle()</a>--Destroy an EIM Handle<br>
|
|
</li>
|
|
</ul>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- E X A M P L E -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
|
|
<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 will get connection information used by the operating
|
|
system.</p>
|
|
|
|
<pre>
|
|
#include <eim.h>
|
|
#include <qsyeimapi.h>
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int rc;
|
|
char eimerr[100];
|
|
EimRC *err;
|
|
EimHandle handle;
|
|
|
|
err = (EimRC *)eimerr;
|
|
err->memoryProvidedByCaller = 100;
|
|
|
|
if (0 != (rc = QsyGetEIMHandle(&handle,
|
|
err)))
|
|
{
|
|
printf("Get connected handle error = %d", rc);
|
|
return -1;
|
|
}
|
|
|
|
... other eim operations
|
|
|
|
|
|
if (0 != (rc = eimDestroyHandle(&handle,
|
|
err)))
|
|
{
|
|
printf("Destroy eim handle error = %d", rc);
|
|
return -1;
|
|
}
|
|
|
|
|
|
return 0;
|
|
}
|
|
</pre>
|
|
|
|
<br>
|
|
<!-- ============================================================== -->
|
|
<!-- -->
|
|
<!-- F O O T E R -->
|
|
<!-- -->
|
|
<!-- ============================================================== -->
|
|
<img src="deltaend.gif" alt="End of change">
|
|
<hr>
|
|
API introduced: V5R4
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"sec.htm">Security APIs</a> | <a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
<img src="deltaend.gif" alt="End of change">
|
|
</body>
|
|
</html>
|
|
|