Home | Previous Page | Next Page   Overview of IBM Informix ODBC Driver > Using IBM Informix ODBC Driver >

Environment Variables

The following table describes environment variables that you must set for the driver. For more information about environment variables, see the IBM Informix: Guide to SQL Reference.

Environment Variable Description
INFORMIXDIR Full path of the directory where the IBM Informix Client Software Developer's Kit is installed.

On Windows platforms, INFORMIXDIR is a registry setting rather than an environment variable. It is set during installation.

PATH Directories that are searched for executable programs. Your PATH setting must include the path to your $INFORMIXDIR/bin directory.
DBCENTURY (optional) Controls the setting of year values. DBCENTURY affects a client program when a user issues a statement that contains a date or datetime string that specifies only the last two digits of the year. For example:
insert into datetable (datecol) values ("01/01/01");

The database server stores the date specified in this statement as either 01-01-1901 or 01-01-2001, depending on the DBCENTURY value on the client.

DBDATE or GL_DATE (optional) DBDATE and GL_DATE control the interpretation of dates. For example, you can specify whether the date format is mm-dd-yyyy or yyyy-mm-dd.

Setting Environment Variables on UNIX

If you set these environment variables at the command line, you must reset them whenever you log onto your system. If you set these environment variables in a file, they are set automatically when you log onto your system.

IBM Informix ODBC Driver provides a sample setup file called setup.odbc in $INFORMIXDIR/etc. You can use this file to set environment variables for the driver. The following table describes the environment variables that are in setup.odbc.

Environment Variable
Description
INFORMIXDIR
Full path of the directory where IBM Informix Client Software Developer's Kit is installed
INFORMIXSQLHOSTS
This value is optional. It specifies the directory that contains sqlhosts. By default, sqlhosts is in $INFORMIXDIR/etc. Set INFORMIXSQLHOSTS if you want sqlhosts to be in a different directory.
ODBCINI
This value is optional. You can use it to specify an alternative location for the odbc.ini file. The default location is your home directory.

Setting Environment Variables in Windows

If you set the environment variables at the command line, you must reset them whenever you log into your Windows environment. If you set them in the Windows registry, however, they are set automatically when you log in. IBM Informix ODBC Driver stores environment variables in the following location in the Windows registry:

\HKEY_CURRENT_USERS\Software\Informix\Environment 

In a Windows environment you must use setnet32.exe, or a tool that will update the registry correctly, to set environment variables that IBM Informix dynamic link libraries (DLLs), such as iclit09b.dll, use.

You can use environment variables as required by your development environment. For example, the compiler needs to know where to find include files. To specify the location of include files, set the environment variable INFORMIXDIR (or some other environment variable) and then set the include path to INFORMIXDIR\incl\cli.

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