DB2 Server for VM: System Administration


Preparing the Application Requester to use TCP/IP

The following must be done to allow an application requester to use TCP/IP.

  1. TCP/IP for VM must be installed and configured.
  2. The TCP/IP client data disk must be accessed. This disk is often defined as TCPMAINT 592. This disk contains the TCPIP DATA file and the ETC SERVICES file which are necessary for successful TCP/IP support initialization.
  3. The ARICTCP MODULE must be created and stored on the production disk. The instructions for creating the ARICTCP MODULE are found in the DB2 Server for VM program directory.
  4. A C runtime library must be available. The SCEERUN LOADLIB provided with VM/ESA Version 2 Release 2.0 or later is sufficient. The C runtime library provided with LE for VM is also acceptable.
  5. Optionally, the ETC SERVICES file must be updated with the RESID of the application server and the port number it should use.
  6. The CMS communications directory, COMDIR, must be updated for TCP/IP.
  7. The CEEPIPI MODULE may have to be rebuilt, to prevent the user exit CBEEXIT from clearing the SYSIN filedef when the LE environment is terminated. If this is not done, file not open or file not found errors will be received from programs that access a database using TCP/IP and have defined a SYSIN filedef for input. SQLPREP and SQLDBSU are two such programs. Instructions for modifying the CEEPIPI MODULE are found in the DB2 Server for VM program directory.

To indicate that TCP/IP is to be used to establish a connection from the application requester, the communications directory, COMDIR, is used. If the COMDIR entry for the database that is the target of the SQL CONNECT statement has host and service entries defined, then TCP/IP will be used to establish the connection. If a DB2 Server for VM application requester wants to access a remote database using TCP/IP, an entry in the communications directory, COMDIR, must be set up.

The COMDIR must be set up to provide the host and service names the requester will use on the connection. A TCP/IP COMDIR entry will look like the following:

:nick.TCPVM1   :service.SQLTEST
               :host.TORVMLB6
               :security.PGM
               :userid.USERID
               :password.PASSWORD
               :dbname.SQLTEST
:nick.TCPVM2   :service.6100
               :host.9.21.31.109
               :security.PGM
               :userid.USERID
               :password.PASSWORD
               :dbname.SQLPROD

The tpn tag is replaced with the service tag and the luname tag is replaced with the host tag. The modename tag is not needed because it is an SNA network parameter. An IP address can be specified instead of a host name on the host tag and a port number can be specified on the service tag instead of a service name. This will bypass host name and service name lookup calls.

When the COMDIR search is done on the dbname, if the service and host tags are present, then TCP/IP will be used. If the tpn and luname tags are present, then SNA will be used. If both are present an error, SQLCODE = -841, SQLERRM = X'0015', will be issued. If the modename tag appears with the host and service tags, it will be ignored.

The security, userid and password tags will be used for both SNA and TCP/IP protocols. If TCP/IP communications is being used, the user cannot use APPCPASS directory statements for specifying the userid and password. APPCPASS is only used by SNA LU 6.2 communications.

The nick tag is still not used. The search of the COMDIR is based on the dbname tag and the first matching entry is used.

Since the COMDIR search is not performed until the user issues an SQL CONNECT statement, either implicitly or explicitly, any errors related to COMDIR setup problems must be reflected in an SQLCA returned to the application requester after the CONNECT statement. This will be reflected as SQLCODE = -841, A communications directory error has occurred. Reason Code=X'n'. The reason code will indicate the nature of the error.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]