Checking environment variables with the chkenv utility

About this task

The chkenv utility checks the validity of shared or private environment-configuration files. It validates the names of the environment variables in the file, but not their values. Use chkenv to provide debugging information when you define, in an environment-configuration file, all the environment variables that your HCL OneDB™ products use.


1  chkenv? pathname filename
filename
is the name of the environment-configuration file to be debugged.
pathname
is the full directory path in which the environment variable file is located.

File $INFORMIXDIR/etc/informix.rc is the shared environment-configuration file. A private environment-configuration file is stored as .informix in the home directory of the user. If you specify no pathname for chkenv, the utility checks both the shared and private environment configuration files. If you provide a pathname, chkenv checks only the specified file.

Issue the following command to check the contents of the shared environment-configuration file:
chkenv informix.rc

The chkenv utility returns an error message if it finds a bad environment-variable name in the file or if the file is too large. You can modify the file and rerun the utility to check the modified environment-variable names.

HCL OneDB products ignore all lines in the environment-configuration file, starting at the point of the error, if the chkenv utility returns the following message:
-33523     filename: Bad environment variable on line number.

If you want the product to ignore specified environment-variables in the file, you can also set the ENVIGNORE environment variable. For a discussion of the use and format of environment-configuration files and the ENVIGNORE environment variable, see page ENVIGNORE environment variable (UNIX).