9. Using 3GL in Your Application : How You Can Preprocess Exec 4GL and Exec SQL Statements
 
Share this page                  
How You Can Preprocess Exec 4GL and Exec SQL Statements
If your 3GL procedure contains exec 4GL or exec SQL statements, that source must be preprocessed into regular C code before it can be compiled. This is done through the esqlcor preprocessor.
By default, the embedded source should have a file extension of .sc, and is preprocessed into a .c file.
Note:  If your files contain EXEC SQL (ESQL/C) commands, you must build your *.c files using esqlcor; using esqlc could produce C code that is incompatible with OpenROAD.
The preprocessor command has the form:
esqlcor [flags] yourfile.sc
Note:  Delete the -prototypes flag from esqlcor commands.
On all platforms, your source file should include the eqdefc.h header file, which contains prototypes of the function calls generated by the esqlcor preprocessor.
The eqdefc.h file is located in the %II_SYSTEM%\ingres\files directory.