Use the VARY TCPIP,,DROP command to drop a single TCP connection or UDP socket, or to stop all established TCP connections for a specified server. For detailed information about drop processing, see Netstat DRop/-D command.
Restriction: You can use this command only if the MVS™.VARY.TCPIP.DROP security product resource profile is defined and the user ID associated with the DROP command is permitted for CONTROL access to this resource.
You can use this command with the connid or CONNECTION parameters to terminate the specific TCP/IP socket endpoint that is identified by its connection number, connid. You can determine the connection number from the Conn column in the Netstat COnn/-c or Netstat TELnet/-t display. This version of the command is the console environment equivalent of the Netstat DRop/-d commands in the TSO and z/OS® UNIX environments.
When the command is issued against a socket endpoint, any outstanding or subsequent socket calls that refer to the dropped socket terminate with a negative return code. The socket endpoint that you drop can be a listening TCP server socket endpoint, a fully connected TCP socket (either server or client connection endpoint), or a UDP socket endpoint. When you drop a TCP connection or UDP endpoint, the associated socket does not close. The application that owns the associated socket is responsible for closing the socket.
If you want to terminate all socket activities from a specific sockets application, terminate the application by using the appropriate mechanism that is provided by the application. This command can have unpredictable results if it is issued against a listening socket or UDP socket. Some applications might not handle the subsequent socket errors as expected. To drop all connections that are associated with a server application without terminating the listening socket, use the form of the VARY DROP command specifying a PORT or JOBNAME, as described in the following information.
EZD2013I numconn CONNECTIONS WERE SUCCESSFULLY DROPPED
Tip: Shut down the server before issuing this command to prevent new connections from using this server. For Sysplex Distributor connections, you can issue a VARY TCPIP,,SYSPLEX,QUIESCE command. For Load Balancing Advisor (LBA) connections, issue a MODIFY LBAGENT,QUIESCE command.
Format:
>>-Vary --TCPIP--,--+----------+--,--+-DRop,-----+--------------> '-procname-' '-CMD=DRop,-' >--+-POrt=portnum--+----------------------------------+-+------>< | '-,JOBNAME=jobname--+------------+-' | | '-,ASID=asid-' | '-JOBNAME=jobname--+------------+--------------------' '-,ASID=asid-'
Servers that are bound to this port number will have all their TCP connections reset. If the portnum value specifies a port that has more than one instance of a server bound to it with either a different jobname or asid value, then either the JOBNAME value, or the JOBNAME and ASID values must be specified to identify a unique server instance for which connections will be dropped.
The following examples are about dropping TCP/IP socket connections.
VARY TCPIP,TCPPROC,CMD=DROP,CONNECTION=5001
VARY TCPIP,,CMD=DROP,CONNECTION=6001
VARY TCPIP,,CMD=DROP,PORT=75,JOBNAME=JOBSRVR1
VARY TCPIP,,CMD=DROP,PORT=75,JOBNAME=JOBSRVR1,ASID=15
VARY TCPIP,,CMD=DROP,JOBNAME=JOBSRVR1,ASID=15