ENDTCP (End TCP/IP) Command
Purpose
The End TCP/IP (ENDTCP) command ends TCP/IP processing.
Note: 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 AS/400 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, all TCP/IP server jobs for TELNET, FTP,
SMTP, LPD, BOOTP, TFTP, RouteD, REXEC, HTTP, WSG, POP, and the SNMP agent that
are currently active in the QSYSWRK subsystem are ended. See the description of
the ENDSVR parameter below.
° 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.
Optional Parameters
OPTION Specifies whether TCP/IP processing is ended in an
immediate or controlled manner.
*IMMED: TCP/IP processing is ended immediately.
Note: The ENDTCP OPTION(*IMMED) command should be used carefully.
Partially updated data may result if an application is processing data and has
not completed an operation when the ENDTCP *IMMED command is issued. It is
suggested that you do the following:
° Notify all users before issuing the ENDTCP command so that they can end
their applications.
° Issue the ENDTCP command at a time when you know no TCP/IP traffic is
occurring on the AS/400 system. To display the current TCP/IP traffic on the
AS/400, use option 3 on the Work with TCP/IP Status (WRKTCPSTS or NETSTAT)
command.
*CNTRLD: TCP/IP processing is ended in a controlled manner.
Applications using TCP/IP are given time to complete their processing. New
application processing is not allowed. After the specified period of time
elapses, the processing for ENDTCP OPTION(*IMMED) is performed.
The controlled end processing does not do any of the following:
° It does not monitor to see if all TCP/IP processing has completed before
the specified period of time has elapsed.
° It does not notify an application that is actively using a TCP/IP
connection that TCP/IP processing will be ended.
DELAY Specifies the amount of time (in seconds) allowed in which
to complete a controlled end of TCP/IP processing. After this period of time all
TCP/IP processing is ended immediately.
delay-time: Specify the number of seconds in which the end
operation is completed. Valid values range from 1 through 86400 seconds.
ENDSVR Specifies whether or not all TCP/IP application server jobs
are ended when the End TCP/IP (ENDTCP) command ends TCP/IP processing.
Note: Before specifying *NO for this parameter, please consider the
following:
° It is not possible to end all the TCP/IP processing on your system without
affecting the applications which use TCP/IP.
° If TCP/IP processing is ended and no form of TCP/IP emulation (such as
AnyNet) is active, then TCP/IP applications which are not restarted will not
function correctly.
° Applications that use the Pascal API must always be ended and restarted
whenever TCP/IP processing is ended and restarted.
*YES: The ENDTCP command ends all TCP/IP application servers prior
to ending TCP/IP processing.
*NO: The ENDTCP command does not end any TCP/IP application server
jobs when it ends TCP/IP processing.
Note: ENDTCP ENDSVR(*NO) can be used to end TCP/IP processing without
disturbing the operation of jobs using AnyNet. TCP/IP processing will be ended,
however TCP/IP application servers that are using AnyNet will continue to
function.
If both TCP/IP and AnyNet are inactive, use the End TCP/IP Server (ENDTCPSVR)
command to end TCP/IP application server jobs.
Examples
Example 1: Ending TCP/IP Immediately
ENDTCP *IMMED
This command ends all TCP/IP processing on the AS/400 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 *IMMED ENDSVR(*NO)
This command ends all TCP/IP processing on the AS/400 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.
|