Home | Previous Page | Next Page   Environment Variables > Environment Variables >

CPFIRST

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

Read syntax diagramSkip visual syntax diagram>>-setenv--CPFIRST--+-TRUE--+----------------------------------><
                    '-FALSE-'
 

When you compile an ESQL/C program with CPFIRST not set, the 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 an ESQL/C program source file in the following order:

  1. Run the C preprocessor
  2. Run the 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 ESQL/C preprocessor on all 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
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]