CPFIRST environment variable

Use the CPFIRST environment variable to specify the default compilation order for all Informix® ESQL/C source files in your programming environment.


1  setenv CPFIRST
2.1 TRUE
2.1 FALSE
When you compile Informix ESQL/C programs with CPFIRST not set, the Informix ESQL/C preprocessor runs first, by default, on the program source file and then passes the resulting file to the C language preprocessor and compiler. You can, however, compile the Informix ESQL/C program source file in the following order:
  1. Run the C preprocessor
  2. Run the Informix ESQL/C preprocessor
  3. Run the C compiler and linker

To use a nondefault compilation order for a specific program, you can either give the program source file a .ecp extension, run the -cp option with the esql command on a program source file with a .ec extension, or set CPFIRST.

Set CPFIRST to TRUE (uppercase only) to run the C preprocessor before the Informix ESQL/C preprocessor on all Informix ESQL/C source files in your environment, irrespective of whether the -cp option is passed to the esql command or the source files have the .ec or the .ecp extension.

To restore the default order on a system where the CPFIRST environment variable has been set to TRUE, you can set CPFIRST to FALSE. On UNIX™ systems that support the C shell, the following command has the same effect:
unsetenv CPFIRST