CPFIRST environment variable

Use the CPFIRST environment variable to specify the default compilation order for all source files in your programming environment.

1  setenv CPFIRST
2.1 TRUE
When you compile programs with CPFIRST not set, the 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 program source file in the following order:
  1. Run the C preprocessor
  2. Run the 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 preprocessor on all 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