Using the eprotect.exe utility (Windows™)
Windows™ users can use the eprotect.exe utility to run the preprocessor on the Informix® ESQL/C 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 Informix® ESQL/C source file on Windows™:
Procedure
- Run the following command:
This command protects all of the SQL keywords against interpretation by the C Preprocessor and writes the result to the file filename.c.%INFORMIXDIR%\lib\eprotect.exe filename.ec filename.c
- Run the following command:
This command runs the C Preprocessor on the source file filename.c and writes the result to the file filename2.c.cl /E filename.c > filename2.c
- Run the following command:
This command removes SQL keyword protection and stores the result in filename.ec.%INFORMIXDIR%\lib\eprotect.exe -u filename2.c filename.ec
- Run esql on the source file to compile it.