Setting environment variables in a configuration file
About this task
The common (shared) environment-configuration file that
is provided with HCL
OneDB™ products
is located in $INFORMIXDIR/etc/informix.rc. Permissions
for this shared file must be set to 644
.
- Stored in the user's home directory
- Named .informix
- Permissions set to readable by the user
#
comment indicator) and variable
definition lines that set values (separated by blank spaces or tabs),
as the following example shows: # This is an example of an environment-configuration file
#
DBDATE DMY4-
#
# These are ESQL/C environment variable settings
#
INFORMIXC gcc
CPFIRST TRUE
You can use the ENVIGNORE environment variable, described in ENVIGNORE environment variable (UNIX), to override one or more entries in an environment-configuration file. Use the HCL OneDB chkenv utility, described in Checking environment variables with the chkenv utility, to perform a sanity check on the contents of an environment-configuration file. The chkenv utility returns an error message if the file contains a bad environment variable or if the file is too large.
The first time you set an environment variable in a shell file or environment-configuration file, you must tell the shell process to read your entry before you work with your HCL OneDB product. If you use a C shell, source the file; if you use a Bourne or Korn shell, use a period ( . ) to execute the file.