We have an application that has our iSeries(AS/400) connect to a remote IP address and port. If we have to end the application and restart it (IPL, error, end/start subsystem) the iSeries keeps the connection open. AFter the application is restarted, the TCP connections show two connections to the remote IP, and the application does not transfer data on the new(second) connection. I have looked at the ENDTCPCNN command, and it requires the local IP address and port. Is there any way to capture this information in a program? We would like to automate the ENDTCPCNN command so the operators do not need to look up the local port each time.