ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/endtcpcnn.htm

226 lines
8.7 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">
<title>End TCP/IP Connection (ENDTCPCNN)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="ENDTCPCNN.Top_Of_Page"></a>
<h2>End TCP/IP Connection (ENDTCPCNN)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#ENDTCPCNN.PARAMETERS.TABLE">Parameters</a><br>
<a href="#ENDTCPCNN.COMMAND.EXAMPLES">Examples</a><br>
<a href="#ENDTCPCNN.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="ENDTCPCNN"></a>
<p>The End TCP/IP Connection (ENDTCPCNN) command is used to end a Transmission Control Protocol/Internet Protocol (TCP/IP) connection. This command ends a connection immediately and should be used only when a normal end is not possible.
</p>
<p>
<b>Note: </b>The ENDTCPCNN command is usually used by specifying option 4 on the Work with TCP/IP Connection Status list of the WRKTCPSTS (NETSTAT) display. The ENDTCPCNN command is provided as a separate command to give system administrators control over this function. By limiting the authority to the ENDTCPCNN command, the system administrator limits which users can end TCP/IP connections without restricting access to the NETSTAT utility.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="ENDTCPCNN.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#ENDTCPCNN.PROTOCOL"><b>PROTOCOL</b></a></td>
<td valign="top">Protocol</td>
<td valign="top">*UDP, *TCP</td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#ENDTCPCNN.LCLINTNETA"><b>LCLINTNETA</b></a></td>
<td valign="top">Local internet address</td>
<td valign="top"><i>Character value</i>, *</td>
<td valign="top">Required, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#ENDTCPCNN.LCLPORT"><b>LCLPORT</b></a></td>
<td valign="top">Local port</td>
<td valign="top">1-65535</td>
<td valign="top">Required, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#ENDTCPCNN.RMTINTNETA"><b>RMTINTNETA</b></a></td>
<td valign="top">Remote internet address</td>
<td valign="top"><i>Character value</i>, *</td>
<td valign="top">Optional, Positional 4</td>
</tr>
<tr>
<td valign="top"><a href="#ENDTCPCNN.RMTPORT"><b>RMTPORT</b></a></td>
<td valign="top">Remote port</td>
<td valign="top">1-65535, *</td>
<td valign="top">Optional, Positional 5</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="ENDTCPCNN.PROTOCOL"></a>
<h3>Protocol (PROTOCOL)</h3>
<p>Specifies the protocol used by the connection that is to be ended. The protocol value must be either *TCP or *UDP.
</p>
<dl>
<dt><b>*UDP</b></dt>
<dd>The connection was created for use with the User Datagram Protocol (UDP).
</dd>
<dt><b>*TCP</b></dt>
<dd>The connection was created for use with the Transmission Control Protocol (TCP).
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ENDTCPCNN.LCLINTNETA"></a>
<h3>Local internet address (LCLINTNETA)</h3>
<p>Specifies the local internet address of the connection to end. This parameter is required for both UDP and TCP.
</p>
<dl>
<dt><b>*</b></dt>
<dd>The remote port number was left unspecified when this connection was opened.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the local internet address. The internet address is specified in the form <i>nnn.nnn.nnn.nnn</i>, where <i>nnn</i> is a decimal number ranging from 0 through 255. An internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address. If the internet address is entered from a command line, the address must be enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ENDTCPCNN.LCLPORT"></a>
<h3>Local port (LCLPORT)</h3>
<p>Specifies the local port number of the connection to end. This parameter is required for both UDP and TCP. A decimal number identifying a local port must always be specified for this command.
</p>
<dl>
<dt><b><i>1-65535</i></b></dt>
<dd>Specify the local port number of the connection to end.
<p><b>Attention:</b>
</p>
<p>Ports 1 through 1024 are reserved for use by system-supplied TCP/IP applications. If the user specifies ports 1 through 1024, it can affect the operation of those applications.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ENDTCPCNN.RMTINTNETA"></a>
<h3>Remote internet address (RMTINTNETA)</h3>
<p>Specifies the remote internet address of the connection to end. This parameter is required for TCP.
</p>
<dl>
<dt><b>*</b></dt>
<dd>The remote port number was left unspecified when this connection was opened.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the remote internet address. The internet address is specified in the form <i>nnn.nnn.nnn.nnn</i>, where <i>nnn</i> is a decimal number ranging from 0 through 255. An internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address. If the internet address is entered from a command line, the address must be enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="ENDTCPCNN.RMTPORT"></a>
<h3>Remote port (RMTPORT)</h3>
<p>Specifies the remote port number of the connection to end.
</p>
<p>This parameter is required for TCP.
</p>
<dl>
<dt><b>*</b></dt>
<dd>The remote port number was left unspecified when this connection was opened.
</dd>
<dt><b><i>1-65535</i></b></dt>
<dd>Specify the remote port number of the connection to end.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ENDTCPCNN.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Ending a TCP Connection</b>
</p>
<p>
<pre>
ENDTCPCNN PROTOCOL(*TCP) LCLINTNETA('9.5.1.109')
LCLPORT(13054)
RMTINTNETA('9.130.28.144') RMTPORT(23)
</pre>
</p>
<p>This command ends the TCP connection between local port 13054 for local internet address 9.5.1.109 and remote port 23 for remote internet address 9.130.28.144. The TCP/IP protocol stack ends all activity on the connection and returns the resources to the free storage pools.
</p>
<p><b>Example 2: Closing a UDP Socket</b>
</p>
<p>
<pre>
ENDTCPCNN PROTOCOL(*UDP) LCLINTNETA('9.130.28.144')
LCLPORT(596)
</pre>
</p>
<p>This command closes the UDP socket using local port 596 and local internet address 9.130.28.144. The TCP/IP protocol stack ends all activity on the connection and returns the resources to the free storage pools.
</p>
<p><b>Example 3: Ending a LISTEN State TCP Socket</b>
</p>
<p>
<pre>
ENDTCPCNN PROTOCOL(*TCP) LCLINTNETA(*) LCLPORT(5023)
RMTINTNETA(*) RMTPORT(*)
</pre>
</p>
<p>This command ends the TCP socket that is listening on local port 5023. The application that created this socket did not specify a local internet address. The socket is closed and the local port is made available for use by another application.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="ENDTCPCNN.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>TCP2670</b></dt>
<dd>Not able to complete request. TCP/IP services are not available.
</dd>
<dt><b>TCP3B01</b></dt>
<dd>Not able to end TCP connection &amp;3 &amp;4, &amp;5 &amp;6.
</dd>
<dt><b>TCP3B02</b></dt>
<dd>Not able to close UDP socket &amp;3 &amp;4.
</dd>
<dt><b>TCP9999</b></dt>
<dd>Internal system error in program &amp;1.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#ENDTCPCNN.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>