Configuring the Services File

Services That Require an Entry in the Services File

Here are typical examples of port services that require configuration in the services file:
  • Telnet service
  • spawner port
  • SAS/SHARE server ID or port
  • firewall computer port
  • dedicated TCP/IP port service that is used for MP CONNECT piping
Note: If you have access to a UNIX operating environment, see the services (4) manual page for more information about this file.
The location of the services file depends on the operating environment. For example, the UNIX services file is located at /etc/services. The services file on Windows is typically located in the C:\Windows\System32\drivers\etc directory.

Example Services File

Here is an example excerpt from a services file.
<official-service-name> <port-number/protocol-name> <alias-name>
# The form for each entry is:
#   
# <comments>
#
# Port Services

telnet              23/tcp                # Telnet service
spawnport           4016/tcp              # UNIX spawner port
mktserve            4017/tcp              # Server for Marketing & Sales
server1             5011/tcp              # SAS/SHARE server 1
sassrv2             5012/tcp              # SAS/SHARE server 2
firewall            5010/tcp              # Firewall machine port
pipe1               5020/tcp              # MP Connect pipe
sea                 5021/tcp    biscuit   # SAS/SHARE server 3
# A blank line goes here.
Note: You must enter a blank line (press the ENTER key) at the end of the services file. If a blank line is not at the end of the file, the final line in the file is not detected. For example, if you run a SAS script that contains the name of the configured SAS/SHAREsea, this error message is displayed:
Cannot find TCP service 'sea'

Explanation of Fields

Here is an explanation of each field:
official service name
specifies the name of the service. Service names must meet the criteria for a valid SAS name. (For details about SAS naming rules, see Rules for Words and Names in the SAS Language in SAS Language Reference: Concepts.) For example, you can create a service named SPAWNER for the UNIX spawner program. You will need the Telnet service when signing on to any server that does not use a PC or a UNIX spawner program.
You will also use the service name as the value for the REMOTE= option or in the SIGNON statement to perform a server sign-on.
port number
is a unique number that is associated with the service name. Each reference to that service in other node services files must match the service's port number exactly. Port numbers 0 through 1023 are reserved for system use. Port numbers that are greater than 1023 are available for user-created services.
protocol name
identifies the protocol. udp and tcp are examples of protocol names.
alias name
is an optional synonym for the service. Alias names can be application- or user-dependent. For example, one application can refer to the server as sea and another application can refer to the same server as biscuit.
Note: Each client and server must configure the alias in its services file before the alias can be successfully used. For example, sea and biscuit must be configured in the services file of each client and server that will use the alias.
comments
describe the service.