Previous Page | Next Page

z/OS: TCP/IP Access Method

System Configuration for TCP/IP

Planning for TCP/IP

Here are the primary configuration issues to consider when preparing your site for TCP/IP to run under the z/OS operating environment.

  1. For the IBM IP Communications Server, configure or verify the host name configuration by adding a HOSTNAME statement in the appropriate IBM TCPIP.DATA file.

    For information about TCP/IP stacks and how to determine whether a system uses single or multiple TCP/IP stacks, see Configuring TCP/IP Stacks.

  2. For SAS 9.2, use the IBM z/OS Name Resolver for the resolution of domain names.

  3. Verify that appropriate services are configured for SAS/CONNECT or SAS/SHARE in the SERVICES file. For details, see The Services File.

TCP/IP Overview

TCP/IP is a set of layered protocols that enable cooperating computers to perform tasks and to share resources across a network. TCP/IP consists of TCP and IP.

TCP is a set of routines that applications use to communicate with another computer over a network. All applications do not use TCP. However, all network applications require the services that are provided in IP. IP is a set of routines that TCP calls, but the IP routines are also available to applications that do not use TCP. SAS 9.2 uses both TCP and IP, and requires that certain types of information be made available to the operating environment.

Although you might refer to a computer by using its host name, TCP/IP applications refer to computers by using their IP addresses. To facilitate the use of host names in a network, the Domain Name System translates host names to IP addresses. This Domain Name System provides host-to-IP address mapping through network server hosts, which are called domain name servers. The Domain Name System also provides other information about server hosts and networks, such as the TCP/IP services that are available to the server host and the location of the domain name servers in the network.

TCP/IP: Software Requirements

Verify that these software requirements have been met:

Configuring TCP/IP Stacks

TCP/IP Communication Stack: Definition

TCP/IP stack is a term for the set of protocols that comprise TCP/IP. A TCP/IP communication stack that runs under the z/OS operating environment is implemented as a UNIX System Services (USS) physical file system (PFS). An operating environment can run using one or more TCP/IP stacks.

Note:   A TCP/IP stack is also referred to as a transport driver.  [cautionend]

The IBM INET physical file system type supports a single TCP/IP stack. The IBM CINET physical file system type supports multiple stacks.

Note:   If you will configure only one TCP/IP stack and you have access to both INET and CINET, it is advisable to configure the stack under INET because of its efficiency over CINET.  [cautionend]

Sample Definitions of TCP/IP Stacks

USS physical file systems are configured in the IBM parmlib member BPXPRMnn. These examples show typical entries in the BPXPRMnn parmlib member for INET and CINET physical file systems.

System and Process Limits

These IBM system values are set in the parmlib member BPXPRMnn and affect the number of TCP/IP sockets that SAS can use:


is a system limit that specifies the maximum number of sockets that can be obtained for a given file system type. IBM recommends that this value be set to 64000.


is a process limit that specifies the maximum number of file descriptors that a single process can have open concurrently, such as all open files, directories, sockets, and pipes. IBM recommends that this value be set to 64000.

Note:   You can use the RACF ALTUSER or ADDUSER system commands to set MAXFILEPROC on a per-user basis.  [cautionend]

For details about MAXSOCKETS and MAXFILEPROC, see References.

TCP/IP Host Name Configuration

IP Addresses

In order for a process to connect to a computer via TCP/IP, the process must know the IP address of the computer host name. To obtain the IP address, the process calls these name resolver functions:


retrieves a string that contains its host name.


resolves the host name string to its IP address.

Because each host name is associated with a TCP/IP stack, it is critical that the host name be configured correctly for each TCP/IP stack.

TCP/IP Host Name Configuration for Communications Servers

When an IBM TCP/IP stack starts, the configuration process searches for the host name in the TCPIP.DATA data set. For details, see TCP/IP Stack Configuration Files.

TCP/IP Stack Configuration Files

When a TCP/IP stack is started, the TCP/IP stack reads one or more configuration files that contain statements that define its default behavior. Here are the configuration files:




The following PROFILE.TCPIP statements can restrict the ports that SAS servers can use:


reserves ports for server tasks. The PORT statement specifies only the job names and PROC names that are allowed access to the port.


is the same as PORT parameter but for a range of ports.


defines a list of user IDs that are prohibited from using TCP/IP.


restricts the use of ports 1 to 1023 to specific job names or PROC names that are specified in the PORT or the PORTRANGE statement.

For details about the IBM PROFILE.TCPIP statements, see References.

The search order that is used by the IBM TCP/IP stack to locate PROFILE.TCPIP involves both explicit and dynamic data-set allocation, as follows:


  2. jobname.nodename.TCPIP

  3. hlq.nodename.TCPIP

  4. jobname.PROFILE.TCPIP


Note:   IBM recommends explicitly specifying the PROFILE DD statement in the TCPIPROC JCL. When the PROFILE DD statement is specified, no dynamic allocation is performed.  [cautionend]

SAS does not access the PROFILE.TCPIP file directly. However, because this file is used to configure the IBM TCP/IP stack, the statements in this file can have an indirect effect on how SAS operates.


The TCPIP.DATA file contains the following statements that are used to configure the IBM TCP/IP stack and Communication Server applications.


specifies the member name of the procedure that is used to start the TCPIP address space, which is the TCP/IP stack name.


is used by the TCP/IP stack to determine its host name.


specifies the name of the domain origin, which is appended to the host name to form the fully qualified domain name of the host.


is a high-level qualifier (hlq) for the dynamic allocation of data sets in IBM TCP/IP servers and clients.

For details about the IBM TCPIP.DATA statements, see References.

The IBM TCP/IP stack and the IBM Communication Server applications, including the IBM z/OS Resolver, use the following search order to locate the data set that contains the TCPIP.DATA configuration statements:

  1. GLOBALTCPIPDATA value (z/OS 1.2 and later releases)

  2. RESOLVER_CONFIG environment variable

  3. /etc/resolv.conf


  5. userid.TCPIP.DATA


  7. DEFAULTTCPIPDATA value (z/OS 1.2 and later releases)


Host Name Resolution for Systems that Run Multiple TCP/IP Stacks

There is usually a one-to-correspondence between a TCP/IP stack and its host name. The host name is obtained using the gethostname() function. However, for systems that run using multiple TCP/IP stacks, the identity of the stack's host name is ambiguous. Here is the process for resolving the host name for a multiple TCP/IP stack system:

Determining SAS TCP/IP Stack Affinity

The SAS TCP/IP library uses the UNIX System Services call pfsctl(BPX1PCT) to determine whether the z/OS system is running a single TCP/IP stack environment (INET) or a multiple TCP/IP stack environment (CINET). Here is the process:

SAS Environment Variables

TCIPMCH Environment Variable

Environment variables, which are specified in the file to which the ddname TKMVSENV points, are used to customize TCP/IP for SAS 9.2. SAS 9.2 uses the following SAS environment variable to alter default processing for TCP/IP initialization.

The TCPIPMCH SAS environment variable is useful at sites that simultaneously run multiple TCP/IP packages: either multiple TCP/IP vendor packages or multiple instances of the same vendor's TCP/IP. The TCPIPMCH environment variable is used to specify the name of the TCP/IP stack name, such as a started task. Setting this environment variable is the equivalent of the TCPIPJOBNAME/TCPIPUSERID configuration keywords within the IBM TCPIP.DATA file. If the default value for the TCP/IP stack name is not specified, the value is the first TCP/IP stack that is defined to the system.

For information about setting TCPIPMCH, see Configuring SAS To Use the IBM z/OS Name Resolver.


A SAS data set that is referred to as the TKMVSENV data set file can be used to specify the SAS environment variables. If you use SAS environment variables, you must allocate the TKMVSENV DD in the JCL or CLIST that executes SAS 9.2.

For example, here are the allocation statements for the data set SAS.DATA.TKMVSENV, which contains the desired environment variable information:

Note:   Line numbering in the TKMVSENV data set must be disabled.  [cautionend]

BATCH statement:


TSO statement:


Each logical record contains an environment variable assignment in this format:

SET environment_variable_name=value

TCP/IP Name Resolver Configuration

Name Resolver: Definition

A name resolver is a set of routines that acts as a client on behalf of an application to read a local host file or to access one or more domain name servers (DNS) for name-to-address or address-to-name resolution. Name resolution occurs by calling the name resolver functions getnameinfo() and getaddrinfo() .

A name resolver must be configured for each host. Here are the locations for UNIX configuration files:


contains the local host configuration data.


contains the DNS domain name and the name servers' IP addresses.


contains the service configuration data.

IBM z/OS Name Resolver

Starting with z/OS V1R4, IBM introduced support for Internet Protocol Version 6 (IPv6), which is the successor to the Internet Protocol Version 4 (IPv4). In order to support IPv6, new USS BPX calls for the IBM name resolver were introduced to implement the protocol-independent resolver functions that are described in the RFC 3493 specification. Here is a list of the IBM name resolver functions that are supported in IPv6 and IPv4:

IBM Name Resolver Functions
IPv6 IPv4
getnameinfo(BPX1GNI) gethostbyname()
getaddrinfo(BPX1GAI) gethostbyaddr()

When the IBM z/OS Name Resolver is started, it reads the IBM configuration file that is pointed to by the DD statement SETUP, which can contain the following SETUP directives:






Note:   The most important SETUP directives are GLOBALTCPIPDATA and DEFAULTTCPIPDATA.  [cautionend]


identifies a global TCPIP.DATA file. Any TCPIP.DATA directive that is specified in this file are system-wide and cannot be overridden by a local TCPIP.DATA file.


identifies a default TCPIP.DATA file, which overrides the TCPIP.DATA file that is named TCPIP.TCPIP.DATA.

If a GLOBALTCPIPDATA statement is located in the resolver setup file, the IBM z/OS Name Resolver reads any name resolver directives that are located in this global TCPIP.DATA file. The IBM z/OS Name Resolver then searches for a local TCPIP.DATA file in this order:

  1. RESOLVER_CONFIG environment variable

  2. /etc/resolv.conf


  4. jobname.TCPIP.DATA


  6. DEFAULTTCPIPDATA value (if specified in the z/OS Name Resolver setup file)


Here are some useful IBM z/OS Name Resolver Server directives:


changes the order in which name resolution is performed between a DNS name server and a local hosts file. Using the LOOKUP directive, you can specify DNS only, LOCAL only, DNS LOCAL, or LOCAL DNS. By default, a DNS name server is queried first. If DNS fails, then DNS LOCAL is used.


specifies a search of up to six domains, in the specified order. The first domain name that is specified is used as the value for DOMAINORIGIN. If both the SEARCH and DOMAINORIGIN statements are specified, the one that appears last is used.


specifies up to four IP addresses to use for a specific host. If DNS returns more than one IP address for a host, SORTLIST can use search masks to sort and identify which IP address the resolver returns.


specifies that for a domain name that contains n or more periods (.), the resolver should look up the name as is before applying the DOMAINORIGIN or SEARCH statement settings. The range of n is 1 to 15. The default is 2.

For complete information about these directives, see the IBM documentation z/OS IP Configuration Guide and IP Configuration Reference.

Configuring SAS To Use the IBM z/OS Name Resolver

SAS 9.2 uses the IBM z/OS Name Resolver by default. No configuration is necessary unless SAS is running under a multiple TCP/IP stack system (CINET). If SAS is running under a multiple TCP/IP stack system, the SAS TCP/IP library will need to set the TCP/IP stack affinity. Specify this SAS environment variable:

set TCPIPMCH=stack-affinity

TCPIPMCH is a SAS environment variable that is used to specify the name for the TCP/IP stack, which is also known as a started task. TCPIPMCH is equivalent to the TCPIPJOBNAME and TCIPPUSERID configuration keywords that are used in the IBM TCPIP.DATA file.

If a value is not specified for TCPIPMCH, the SAS TCP/IP library will use the first TCP/IP stack name that is returned by a call to the UNIX System Service, pfsctl(), which might not be the appropriate TCP/IP stack. For information, see TCIPMCH Environment Variable.

The Services File

Services File: Overview

The SERVICES file defines port resources that are used when TCP/IP is used to connect client/server sessions. Examples of configured port services include the Telnet port, spawner ports, MP CONNECT pipes, and SAS/SHARE servers. For more information, see Configuring the SERVICES File.

Configuring SAS Services

A service for each SAS server session (SAS/CONNECT or SAS/SHARE) must be defined in the SERVICES file on each computer that a SAS client session runs on.

Note:   Some TCP/IP stacks can restrict the range of ports that can be used. For details, see TCP/IP Stack Configuration Files.  [cautionend]

The Services File Search Order

The z/OS Name Resolver searches for the SERVICES file, using this order:

  1. value of the ETC_SERVICES environment variable

  2. /etc/services

  3. tso-prefix.ETC.SERVICES under TSO or user-ID.ETC.SERVICES under batch execution



  6. tcpip-prefix.ETC.SERVICES


Albitz, Paul and Cricket Liu. 2001. DNS and BIND. 4th ed. Cambridge, MA: O'Reilly Media.

z/OS V1R9.0 Communication Server: IP Configuration Guide, IBM SC31-8775-11

z/OSV1R9.0 Communication Server: IP Configuration Reference, IBM SC31-8776-12

z/OS V1R9.0 UNIX System Services Planning, IBM GA22-7800-12

The IBM documentation is also available from http:

Previous Page | Next Page | Top of Page