Set UNIX environment variables in one of the following ways:
When you set an environment variable at the system prompt, you must reassign it the next time you log in to the system.
An environment-configuration file is a common or private file where you can set environment variables for each database server user. Use of an environment-configuration file reduces the number of environment variables that you must set at the command line or in a shell file.
When you set an environment variable in your .login, .cshrc, or .profile file, it is assigned automatically every time you log in to the system. For information about these files, see your operating-system manuals.
To override environment variables that have been automatically set, use a private environment-variable file, ~/.informix, or assign new values to environment variables individually. For information about the .informix and informix.rc files, see the IBM Informix Dynamic Server Administrator's Reference.
To check the validity of environment variables, use the chkenv utility.
Figure 1 shows a sample setup file that contains environment variables for the miami database server. LD_LIBRARY_PATH is set to the location of the database server and ESQL/C library files.
setenv INFORMIXDIR /ix/informix93 setenv INFORMIXSQLHOSTS /ix/sqlhosts.unified setenv ONCONFIG onconfig.miami setenv INFORMIXSERVER miami # setup to use J/Foundation setenv JVPHOME /ix/informix93/extend/krakatoa setenv CLASSPATH $JVPHOME/krakatoa.jar:$JVPHOME/jdbc.jar:/usr/java/lib/classes.zip # Include jar paths for Java; include /usr/ccs/bin for C compiler: setenv PATH $INFORMIXDIR/bin:$INFORMIXDIR/extend/krakatoa/krakatoa.jar: $INFORMIXDIR/extend/krakatoa/jdbc.jar:/usr/ccs/bin:$PATH setenv LD_LIBRARY_PATH $INFORMIXDIR/lib:$INFORMIXDIR/lib/esql:/usr/lib