Using NETSTAT

This section details how to use NETSTAT to query TCP/IP port usage and the state of socket connections. This command can be used to verify that the Listener is active and has opened the correct port and to diagnose problems with the socket connection between the client program and the Listener or IMS™ transaction.

Restriction: The client program must have the socket connection open for NETSTAT to query the connection status.
The NETSTAT SOCKETS command displays which ports are open to which address spaces and displays active socket connections and their status. Following is sample output from this command (the output shown is valid for V2R10 and V1R2):
 READY
netstat sockets
 
 MVS TCP/IP NETSTAT CS V2R10        TCPIP Name: TCPCS          12:34:56
 Sockets interface status:
 Type   Bound to                Connected to          State    Conn
 ====   ========                ============          =====    ====
 Name: INETD1    Subtask: 006DB5B8
 Dgram  0.0.0.0..37             *..*                  UDP      00000058
 Dgram  0.0.0.0..13             *..*                  UDP      00000057
 Dgram  0.0.0.0..19             *..*                  UDP      00000056
 Dgram  0.0.0.0..9              *..*                  UDP      00000055
 Dgram  0.0.0.0..7              *..*                  UDP      00000054
 Stream 0.0.0.0..623            0.0.0.0..0            Listen   0000004B
 Stream 0.0.0.0..514            0.0.0.0..0            Listen   0000004D
 Stream 0.0.0.0..513            0.0.0.0..0            Listen   0000004C
 Stream 0.0.0.0..512            0.0.0.0..0            Listen   0000004E
 Stream 0.0.0.0..37             0.0.0.0..0            Listen   00000053
 Stream 0.0.0.0..7              0.0.0.0..0            Listen   0000004F
 Stream 0.0.0.0..13             0.0.0.0..0            Listen   00000052
 Stream 0.0.0.0..19             0.0.0.0..0            Listen   00000051
 Stream 0.0.0.0..9              0.0.0.0..0            Listen   00000050
 Name: OSNMPD    Subtask: 006DBA70
 Dgram  0.0.0.0..161            *..*                  UDP      00000013
 Stream 0.0.0.0..1027           0.0.0.0..0            Listen   00000014
 Name: TCPCS     Subtask: 00000000
 Stream 127.0.0.1..23           127.0.0.1..1033       Estblsh  00000045
 Stream 9.67.113.27..23         9.37.81.207..1096     ClosWait 00000039
 Name: TCPCS     Subtask: 006C57B0
 Stream 0.0.0.0..23             0.0.0.0..0            Listen   00000012
 Name: TCPCS     Subtask: 006D56F0
 Stream 127.0.0.1..1026          127.0.0.1..1025      Establsh 0000000F
 Name: TCPCS     Subtask: 006D5CF0
 Stream 0.0.0.0..1025           0.0.0.0..0            Listen   0000000C
 Stream 127.0.0.1..1025         127.0.0.1..1026       Establsh 00000010
 Name: USER18    Subtask: 006A3400
 Stream 127.0.0.1..1033         127.0.0.1..23         Establsh 00000044
 
 READY

See z/OS Communications Server: IP User's Guide and Commands for more details about the usage, parameters, and output of NETSTAT.