When the local SAS
application is in server mode, it remains in a wait state until a
remote application connects to it. To use the SOCKET access method
in server mode, you need to know only the port number that you want
the server to listen to for a connection. Typically, servers use
well-known
ports to listen for connections. These port numbers
are reserved by the system for specific server applications. For more
information about how well-known ports are defined on your system,
refer to the documentation for your TCP/IP software or ask your system
administrator.
If the server application
does not use a well-known port, then the system assigns a port number
when it establishes the socket from the local application. However,
because any client application that waits to connect to the server
must know the port number, you should try to use a well-known port.
While a local SAS server
application is waiting for a connection, SAS is in a wait state.
Each time a new connection is established, the EOV= variable in the
DATA step is set to 1. Because the server accepts only one connection
at a time, no new connections can be established until the current
connection is closed. The connection closes automatically when the
remote client application disconnects. The SOCKET access method continues
to accept new connections until it reaches the limit set in the RECONN
option.