134 lines
8.2 KiB
HTML
134 lines
8.2 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="cwbCO_Connect" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzaikcommapilist2.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="cwbco_connect" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- 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="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>cwbCO_Connect</title>
|
|
</head>
|
|
<body id="cwbco_connect"><a name="cwbco_connect"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1"><span class="apiname">cwbCO_Connect</span></h1>
|
|
<div><div class="section"><h4 class="sectiontitle">Purpose</h4><p>Connect to the specified iSeries™ host
|
|
service.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Syntax</h4><pre>
|
|
UINT CWB_ENTRY cwbCO_Connect(
|
|
cwbCO_SysHandle system,
|
|
cwbCO_Service service,
|
|
cwbSV_ErrHandle errorHandle );</pre>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Parameters</h4><dl><dt class="dlterm">cwbCO_SysHandle system - input</dt>
|
|
<dd>Handle returned previously from <span class="apiname">cwbCO_CreateSystem</span> or <span class="apiname">cwbCO_CreateSystemLike</span>.
|
|
It identifies the iSeries system to connect to.</dd>
|
|
<dt class="dlterm">cwbCO_Service service - input</dt>
|
|
<dd>The service to connect to on the iSeries system. Valid values are those
|
|
listed in <a href="rzaikcwbcoservicedefines.htm#cwbco_servicedefines">Defines for cwbCO_Service</a>,
|
|
except for the values CWBCO_SERVICE_ANY and CWBCO_SERVICE_ALL. Only one service
|
|
may be specified for this API, unlike for cwbCO_Disconnect, which can disconnect
|
|
multiple services at once.
|
|
</dd>
|
|
<dt class="dlterm">cwbSV_ErrHandle errorHandle - input/output</dt>
|
|
<dd>Any returned messages will be written to this object. It is created with
|
|
the <span class="apiname">cwbSV_CreateErrHandle</span> API. The messages may be retrieved
|
|
through the <span class="apiname">cwbSV_GetErrText</span> API. If the parameter is set
|
|
to zero, or if the errorHandle is invalid, no messages will be retrieved.</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Return Codes</h4><p>The following list shows common return
|
|
values.</p>
|
|
<dl><dt class="dlterm">CWB_OK</dt>
|
|
<dd>Successful completion.</dd>
|
|
<dt class="dlterm">CWB_INVALID_API_HANDLE</dt>
|
|
<dd>Invalid system handle.</dd>
|
|
<dt class="dlterm">CWB_SERVICE_NAME_ERROR</dt>
|
|
<dd>The service identifier is not a valid value, or was a combination of values
|
|
(only a single value is allowed for this API).</dd>
|
|
<dt class="dlterm">CWB_CONNECTION_TIMED_OUT</dt>
|
|
<dd>It took too long to find the iSeries system, so the attempt timed
|
|
out.</dd>
|
|
<dt class="dlterm">CWB_CONNECTION_REFUSED</dt>
|
|
<dd>The iSeries system
|
|
refused to accept our connection attempt.</dd>
|
|
<dt class="dlterm">CWB_NETWORK_IS_DOWN</dt>
|
|
<dd>A network error occurred, or TCP/IP is not configured correctly on the
|
|
PC.</dd>
|
|
<dt class="dlterm">CWB_NETWORK_IS_UNREACHABLE</dt>
|
|
<dd>The network segment to which the iSeries system is connected currently
|
|
is not reachable from the segment to which the PC is connected.</dd>
|
|
<dt class="dlterm">CWB_USER_TIMEOUT</dt>
|
|
<dd>The connect timeout value associated with the system object expired before
|
|
the connection attempt completed, so we stopped waiting.</dd>
|
|
<dt class="dlterm"><img src="./delta.gif" alt="Start of change" />CWB_FIPS_UNAVAILABLE<img src="./deltaend.gif" alt="End of change" /></dt>
|
|
<dd><img src="./delta.gif" alt="Start of change" />This connection is configured for SSL and FIPS-compliant mode is enabled,
|
|
however, SSL cannot be used because FIPS support is not available. For recovery
|
|
information, see message CWBCO1060, using the following path:<ul class="simple"><li><span class="menucascade"><span class="uicontrol">Start</span> > <span class="uicontrol">iSeries Access for
|
|
Windows folder</span> > <span class="uicontrol">Service</span> > <span class="uicontrol">Error and
|
|
Trace Message Help</span> > <span class="uicontrol">iSeries Access for Windows messages</span> > <span class="uicontrol">CWBCO1060</span></span></li>
|
|
</ul>
|
|
<img src="./deltaend.gif" alt="End of change" /></dd>
|
|
</dl>
|
|
<div class="note"><span class="notetitle">Note:</span> Other return codes may be commonly returned as the result
|
|
of a failed security validation attempt. See the list of common return codes
|
|
in the comments for <span class="apiname">cwbCO_Signon</span>.</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Usage</h4><p>If signon to the iSeries system has not yet occurred,
|
|
the signon will be performed first when <span class="apiname">cwbCO_Connect</span> is
|
|
called. If you want the signon to occur at a separate time, call <span class="apiname">cwbCO_Signon</span> first,
|
|
then call <span class="apiname">cwbCO_Connect</span> at a later time. For more information
|
|
about signon and its behavior, see comments for <span class="apiname">cwbCO_Signon</span>.
|
|
If the signon attempt fails, a connection to the specified service will not
|
|
be established.</p>
|
|
<p>If the iSeries system as named in the specified system object
|
|
does not exist in the System List, and the system object Persistence Mode
|
|
is set appropriately, then when <span class="apiname">cwbCO_Connect</span> or <span class="apiname">cwbCO_Signon</span> is
|
|
first successfully called, the iSeries system, as named in the system
|
|
object, will be added to the System List. For more information about the Persistence
|
|
Mode, see the comments for <span class="apiname">cwbCO_SetPersistenceMode</span>.</p>
|
|
<p>If
|
|
a connection to the specified service already exists, no new connection will
|
|
be established, and CWB_OK will be returned. Each time this API is successfully
|
|
called, the usage count for the connection to the specified service will be
|
|
incremented.</p>
|
|
<p>Each time <span class="apiname">cwbCO_Disconnect</span> is called
|
|
for the same service, the usage count will be decremented. When the usage
|
|
count reaches zero, the actual connection is ended. </p>
|
|
<p>Therefore, it is
|
|
VERY IMPORTANT that for every call to the <span class="apiname">cwbCO_Connect</span> API
|
|
there is a later paired call to the <span class="apiname">cwbCO_Disconnect</span> API,
|
|
so that the connection can be ended at the appropriate time. The alternative
|
|
is to call the <span class="apiname">cwbCO_Disconnect</span> API, specifying CWBCO_SERVICE_ALL,
|
|
which will disconnect all existing connections to ALL services made through
|
|
the specified system object, and reset all usage counts to 0.</p>
|
|
<p>If the
|
|
return code is CWB_USER_TIMEOUT, you may want to increase the connect timeout
|
|
value for this system object, by calling <span class="apiname">cwbCO_SetConnectTimeout</span>,
|
|
and try connecting again. If you want iSeries Access to not give up until the
|
|
TCP/IP communication stack itself does, set the connect timeout to CWBCO_CONNECT_TIMEOUT_NONE,
|
|
and try connecting again.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikcommapilist2.htm" title="These APIs allow you to connect to and disconnect from the iSeries system, and for related behavior">Communications and security: Connect and disconnect APIs</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |