Most OS/2 compilers use environment variables to control various options. You can set these variables in your CONFIG.SYS file, or you can create command files to set them.
If you set environment variables by running a command file, you must build your applications in the same window in which you set the environment variables. If you build your applications in another window, you will not be using the same options you set in your first window.
When you install the DB2 AD Client, this statement is put into the CONFIG.SYS file:
set LIB=%DB2PATH%\lib;%LIB%
The command files in this book assume that this statement is present. If you edit the CONFIG.SYS file after installing the DB2 AD Client, make sure this statement is not removed.
As well, these environment variables are automatically updated by DB2:
For the Java environment variables updated by DB2, see "OS/2".
In addition, if you are using one of the programming languages shown below, the CONFIG.SYS file must have the appropriate statement:
On OS/2, no DB2 environment variables should be defined in CONFIG.SYS apart from DB2PATH and DB2INSTPROF. All DB2 variables should be defined in the DB2 Instance Profile Registry either at the global level, the instance level, or the instance node level (Parallel Edition). Use the db2set.exe command to set, modify, and list the variables.
Note: | DB2INSTANCE is not required if you set the DB2INSTDEF registry variable. It defines the default instance name which is used if DB2INSTANCE is not set. |