Setting environment variables

Set environment variables after you install HCL Informix®. If you created a database server during installation, all mandatory environment variables are set, however, you can set optional environment variables.

Before you begin

You must be logged in as root user or with sufficient group or user identifier privileges (usually group or user informix) to set environment variables.

About this task

To set the environment variables for an Informix® instance:

Procedure

  1. Set the INFORMIXDIR environment variable to the directory where you installed HCL® Informix® products.
  2. Set the PATH environment variable to include $INFORMIXDIR/bin as follows:
    • C shell:
      setenv PATH ${INFORMIXDIR}/bin:${PATH}
    • Bourne shell:
      PATH=$INFORMIXDIR/bin:$PATH
      export PATH

    You must set the INFORMIXDIR variable and add $INFORMIXDIR/bin to the PATH environment variable for each user.

  3. Set the INFORMIXSERVER environment parameter to specify the default database server to which HCL® Informix® DB-Access or an SQL API client makes an explicit or implicit connection.
  4. Set the ONCONFIG environment variable to the name of a valid onconfig file. See Setting configuration parameters to create or modify your onconfig file.
  5. If you want to use a locale or language other than the default locale of US English, set the following environment variables:
    1. Set the CLIENT_LOCALE environment parameter to specify a nondefault locale.
    2. Set the DBLANG environment parameter to specify the subdirectory of $INFORMIXDIR that contains the customized language-specific message files that HCL® Informix® products use.
    3. Set the DB_LOCALE environment parameter.
    4. Set the SERVER_LOCALE environment parameter.
    5. Set the GL_USEGLU environment parameter if you plan to use UTF-8 character encoding. You must set the GL_USEGLU environment parameter before you create a database in which you plan to store UTF-8 character data.
  6. Set the INFORMIXSQLHOSTS environment parameter to specify the file that contains the sqlhosts information. (The default location of this file is $INFORMIXDIR/etc/sqlhosts.)
  7. Set the INFORMIXTERM environment parameter to specify whether HCL® Informix® DB-Access uses the information in the termcap file or the terminfo directory.
    On character-based systems, the termcap file and terminfo directory determine terminal-dependent keyboard and screen capabilities, such as the operation of function keys, color and intensity attributes in screen displays, and the definition of window borders and graphic characters.
  8. If your applications are compiled with the Client SDK, set the platform-specific library path environment variable to $INFORMIXDIR/lib and to the product library subdirectory. Following are the names of the platform-specific library path environment variable:
    PlatformEnvironment Variable
    AIX® LIBPATH
    HP-UX SHLIB_PATH
    Mac OS X DYLD_LIBRARY_PATH
    Solaris and most other platforms LD_LIBRARY_PATH
    For example, to use ESQL/C shared libraries on AIX®, set the environment variable LIBPATH as follows:
    • Bourne or Korn Shell
      LIBPATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LIBPATH
      export LIBPATH
    • C shell:
      setenv LIBPATH $INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:$LIBPATH
    See the machine notes for the product shared-libraries path names.