Using the command prompt to change environment variables

You can change the setting of an environment variable at a command prompt.

About this task

The following diagram shows the syntax for setting an environment variable at a command prompt in Windows™.

1  set ABCD = value

If no value is specified, the environment variable is unset, as if it did not exist.

To view your current settings after one or more HCL OneDB™ products are installed, enter the following command at the command prompt.

1  set

Sometimes you must add information to an environment variable that is already set. For example, the PATH environment variable is always set in Windows environments. When you use HCL OneDB products, you must add the name of the directory where the executable files for the HCL OneDB products are stored to the PATH.

In the following example, ONEDB_HOME is d:\informix (that is, during installation, HCL OneDB products were installed in the d: \informix directory). The executable files are in the bin subdirectory, d:\informix\bin. To add this directory at the beginning of the PATH environment-variable value, use the following command:
set PATH=d:\informix\bin;%PATH%
Rather than entering an explicit pathname, you can use the value of the ONEDB_HOME environment variable (represented as %ONEDB_HOME%), as the following example shows:
set ONEDB_HOME=d:\informix
set PATH=%PATH%

You might prefer to use this version to ensure that your PATH entry does not contradict the search path that was set in ONEDB_HOME and to avoid the requirement to reset PATH whenever you change ONEDB_HOME.

For more information about setting and modifying environment variables, see your operating-system publications.