Using the eprotect.exe utility (Windows)

Windows™ users can use the eprotect.exe utility to run the preprocessor on the source file.

About this task

The eprotect.exe utility protects all of the SQL keywords against interpretation by the C preprocessor. The eprotect.exe -u option removes SQL keyword protection.

To change the preprocessor order for the source file on Windows:

Procedure

  1. Run the following command:
    %ONEDB_HOME%\lib\eprotect.exe filename.ec filename.c
    This command protects all of the SQL keywords against interpretation by the C Preprocessor and writes the result to the file filename.c.
  2. Run the following command:
    cl /E filename.c   > filename2.c
    This command runs the C Preprocessor on the source file filename.c and writes the result to the file filename2.c.
  3. Run the following command:
    %ONEDB_HOME%\lib\eprotect.exe -u filename2.c filename.ec
    This command removes SQL keyword protection and stores the result in filename.ec.
  4. Run esql on the source file to compile it.