Configuring TCP/IP for Db2 for z/OS

To configure TCP/IP communications between your Db2 Connect workstation and Db2 for z/OS Version 8 or later, you must first collect network details about the host database server.

Before you begin

The instructions assume the following conditions:
  • You are connecting to a single host database server or location via TCP/IP. Multiple host connections will be handled in exactly the same way, although the port number and service number required in each case might be different. Use the group IP address to connect to a group location.
  • The target database resides on Db2 for z/OS Version 8 or later.
  • All the necessary software prerequisites are installed.
  • Db2 clients have been set up as required.

Procedure

  1. Before you can use Db2 Connect over a TCP/IP connection, you must collect information about both the host database server and the Db2 Connect server. For each host server that you are connecting to via TCP/IP, you must have the following information:
    • The location of the TCP/IP services and hosts files at the Db2 Connect workstation:
      On UNIX and Linux®
      /etc/
      On Windows Server 2003
      Usually %SystemRoot%\system32\drivers\etc\, where %SystemRoot% represents the Windows install path directory.
      You might want to add the host information to a domain name server to avoid maintaining this file on multiple systems.
    • The locations of the equivalent files at the target Db2 for z/OS host.
    • The TCP/IP port number defined to Db2 for z/OS.
      Note: The associated service name information is not exchanged between the Db2 Connect workstation and Db2 for z/OS.
      Port number 446 has been registered as the default for communication from a Db2 Connect workstation.
    • The TCP/IP addresses and host names for both the host and the Db2 Connect workstation.
    • The LOCATION NAME of the Db2 for z/OS database server.
    • The user ID and password to be used when issuing CONNECT requests to the database at the IBM mainframe server.
  2. Refer to your local network administrator and your Db2 for z/OS administrator for help getting this information. Use the tables that follow as a worksheet to plan each TCP/IP connection between Db2 Connect and a host database server.
    Table 1. User Information
    Ref. Description Sample Value Your Value
    TCP-1 User name A.D.B.User
    TCP-2 Contact info (123)-456-7890  
    TCP-5 User ID ADBUSER  
    TCP-6 Database type db2390  
    TCP-7 Connection type (must be TCPIP). TCPIP TCPIP
    Table 2. Network Elements at the Host
    Ref. Description Sample Value Your Value
    TCP-8 Host name MVSHOST  
    TCP-9 Host IP address 9.21.152.100
    TCP-10 Service name db2inst1c  
    TCP-11 Port number 446 446
    TCP-12 LOCATION NAME NEW_YORK3  
    TCP-13 User ID    
    TCP-14 Password    
    Note:
    1. To obtain the host's IP address TCP-9, enter at the host:
         TSO NETSTAT HOME
    2. To obtain the port number TCP-11, look for DSNL004I in the Db2 master address space or system log.
    Table 3. Network Elements at the Db2 Connect client and server
    Ref. Description Sample Value Your Value
    TCP-18 Host name mcook02  
    TCP-19 IP address 9.21.27.179  
    TCP-20 Service name db2inst1c  
    TCP-21 Port number 446 446
    Table 4. Db2 Directory Entries at the Db2 Connect server
    Ref. Description Sample Value Your Value
    TCP-30 Node name MVSIPNOD  
    TCP-31 Database name nyc3  
    TCP-32 Database alias mvsipdb1  
    TCP-33 DCS database name nyc3  
  3. Complete a copy of the worksheet example for each TCP/IP host:
    1. Fill in the values to be used for the host name and IP address of the Db2 for z/OS host (TCP-8 and TCP-9).
    2. Fill in the values to be used for the host name and IP address of the Db2 Connect workstation (TCP-18 and TCP-19).
    3. Determine the service name or port number to be used for the connection (TCP-10 or TCP-20, or TCP-11 or TCP-21).
    4. Determine the LOCATION NAME of the Db2 for z/OS database server to which you want to connect.
    5. Determine the values to be used for user ID and PASSWORD when connecting to the host database.
  4. At your System z® server:
    1. Verify the host address or the host name.
    2. Verify the port number or the service name.
    3. Update the services file with the correct port number and service name if necessary.
    4. Update the hosts file (or the Domain Name Server used by the Db2 for z/OS system) with the host name and IP address of the Db2 Connect workstation if necessary.
    5. Ensure the new definitions are active before attempting to test the connection. Refer to your host network administrator or change control staff if necessary.
    6. Check with the Db2 for z/OS administrator that you have a valid user ID, password, and database LOCATION NAME.
    7. PING the Db2 Connect server, using the correct port number if that option is supported by TCP/IP on the host system. For example:
         ping remote_host_name -p port_number

    Support for your System z server is available at http://www.ibm.com/servers/eserver/support/zseries/