Establishing a remote connection to an Informix enterprise stage

These instructions assume that IBM® InfoSphere® DataStage® has already been installed on your local machine and that the parallel engine is available on the remote machine.

Procedure

  1. Verify that the INFORMIX sqlhosts file on the remote machine has a TCP interface. A TCP interface is necessary to use the remote connection functionality.
  2. Copy the INFORMIX etc/sqlhosts file from the remote machine to a directory on your local machine. Set the INFORMIX HPLINFORMIXDIR environment variable to this directory.

    For example, if the directory on the local machine is /apt/informix, the sqlhosts file should be in the directory /apt/informix/etc, and the HPLINFORMIXDIR variable should be set to /apt/informix.

  3. Set the INFORMIXSERVER environment variable to the name of the remote INFORMIX server.
  4. Add the remote INFORMIX server nodes to your PX node configuration file located in $APT_ORCHHOME/../../config; and use a nodepool resource constraint to limit the execution of the Informix enterprise stage to these nodes.

    In the example configuration file below, the local machine is fastname local_machine, and the INFORMIX remote server machine is fastname remote_machine. The nodepool for the remote nodes is arbitrarily named "InformixServer". The configuration file must contain at least two nodes, one for the local machine and one for the remote machine.

  5. Go to the Stage page Advanced tab of the Informix enterprise stage. Select Node pool and resource constraints and Nodepool along with the name of the node pool constraint (i.e., "InformixServer" in the example configuration file above).
  6. Set up environment variables. Remote access to an INFORMIX database requires the use of two HPLINFORMIXDIR environment variable settings, one for the local InfoSphere DataStage workstation which is set up in step 2 above, and one for the workstation with the remote INFORMIX database. The remote variable needs to be set in a startup script which you must create on the local workstation. This startup script is executed automatically by the parallel engine.

    Here is a sample startup.apt file with HPLINFORMIXDIR being set to /usr/informix/9.4, the INFORMIX directory on the remote machine:

    
    #! /bin/sh
    HPLINFORMIXDIR=/usr/informix/9.4
    export INFORMIXDIR
    INFORMIXSQLHOSTS=$HPLINFORMIXDIR/etc/sqlhosts
    export INFORMIXSQLHOSTS
    shift 2
    exec $*
    
  7. Set the environment variable APT_STARTUP_SCRIPT to the full path name of the startup.apt file.

Results

You are now ready to run an InfoSphere DataStage job which uses the Informix enterprise stage HPL read method to connect to a remote INFORMIX server. If you are unable to connect to the remote server, try making either one or both of the following changes to your sqlhosts file on the local workstation:

  • In the fourth column in the row corresponding to the remote INFORMIX server name, replace the INFORMIX server name with the INFORMIX server port number found in the /etc/services file on the remote workstation.
  • The third column contains the host name of the remote workstation. Change this to the IP address of the remote workstation.