CL Command Reference - ENDTCP
CL Command List > ENDTCP Reference
Description:
The End TCP/IP (ENDTCP) command ends TCP/IP processing.
Attention:
There is no confirmation display shown when ENDTCP is entered. The ENDTCP command must be used carefully. When it is used, it ends all TCP/IP processing on the system that you are working on.
If OPTION(*IMMED) is specified for the ENDTCP command, the following is true:
. All TCP/IP connections are ended. This affects all currently active applications using sockets or the Pascal API.
. Unless ENDSVR(*NO) is specified, TCP/IP server jobs are ended for TELNET, FTP, TFTP, SMTP, LPD, HTTP, POP, RouteD, DHCP, DNS, DDM, BOOTP, REXEC, SNMP, DIRSRV, NSLD, INETD, MGTC, ONDMD, NETSVR, DLFM, VPN, EDRSQL, HOD, ODPA, NTP, QoS, TCM, DOMINO, WEBFACING, and CIMOM.
. Agents that are currently active in the QSYSWRK subsystem are ended. See the description of the End application servers (ENDSVR) parameter for more information.
. All active TCP/IP interfaces are ended.
If OPTION(*CNTRLD) is specified for the ENDTCP command, the following is true:
. No new open operations are allowed to TCP, UDP, or raw sockets.
. A job is submitted to the QSYSWRK subsystem that will, after the time indicated in the DELAY parameter value has expired, do an ENDTCP *IMMED operation.
. An ENDTCP OPTION(*IMMED) can be submitted at any time after issuing ENDTCP OPTION(*CNTRLD). This cancels the controlled end. TCP/IP processing is ended immediately when the ENDTCP OPTION(*IMMED) is issued.
Restrictions:
. This command is conditionally threadsafe. This command calls different programs to process each type of TCP/IP server. If the programs being called are threadsafe, this command is threadsafe.
Examples:
Example 1: Ending TCP/IP Immediately
ENDTCP OPTION(*IMMED)
This command ends all TCP/IP processing on the system immediately.
Example 2: Ending TCP/IP in a Controlled Time
ENDTCP OPTION(*CNTRLD) DELAY(120)
This command ends all TCP/IP processing after 120 seconds have expired. During this time, new TCP/IP processing is not allowed.
Example 3: Ending TCP/IP Immediately Without Ending Application Servers
ENDTCP OPTION(*IMMED) ENDSVR(*NO)
This command ends all TCP/IP processing on the system immediately. However, any TCP/IP application servers (FTP, SMTP, and so on) that are active are not ended when TCP/IP processing is ended.