You can set environment variables for command-prompt utilities in the following ways:
The System applet provides a graphical interface to create, modify, and delete system-wide and user-specific variables. Environment variables that are set with the System applet are visible to all command-prompt sessions.
Click the Environment tab near the top of the window. Two list boxes display System Environment Variables and User Environment Variables. System Environment Variables apply to an entire system, and User Environment Variables apply only to the sessions of the individual user.
The name of the variable and its current value appear in the boxes at the bottom of the window.
The following diagram shows the syntax for setting an environment variable at a command prompt in Windows.
>>-set--ABCD--=--value-----------------------------------------><
If no value is specified, the environment variable is unset, as if it did not exist.
For more information on how to read syntax diagrams, see Syntax Diagrams of the introduction.
To view your current settings after one or more IBM Informix products are installed, enter the following command at the command prompt.
>>-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 an IBM Informix product, you must add the name of the directory where the executable files for the IBM Informix products are stored to the PATH.
In the following example, INFORMIXDIR is d:\informix (that is, during installation, IBM Informix 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 INFORMIXDIR environment variable (represented as %INFORMIXDIR%), as the following example shows:
set INFORMIXDIR=d:\informix set PATH=%INFORMIXDIR%\bin;%PATH%
You might prefer to use this version to ensure that your PATH entry does not contradict the search path that was set in INFORMIXDIR and to avoid the need to reset PATH whenever you change INFORMIXDIR.
For more information about setting and modifying environment variables, refer to your operating-system manuals.
Each time that you open a Windows command prompt, it acts as an independent environment. Therefore, environment variables that you set within it are valid only for that particular command-prompt instance.
For example, if you open one command window and set the variable, INFORMIXDIR, and then open another command window and type set to check your environment, you will find that INFORMIXDIR is not set in the new command-prompt session.
The database server installation program creates a batch file that you can use to configure command-prompt utilities, ensuring that your command-prompt environment is initialized correctly each time that you run a command-prompt session. The batch file, dbservername.cmd, is located in %INFORMIXDIR%, and is a plain text file that you can modify with any text editor. If you have more than one database server installed in %INFORMIXDIR%, there will be more than one batch file with the .cmd extension, each bearing the name of the database server with which it is associated.
To run dbservername.cmd from a command prompt, type dbservername or configure a command prompt so that it runs dbservername.cmd automatically at start up.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]