The Embedded SQL precompiler translates Embedded SQL statements into C data declarations and call statements. After precompiling, you can compile the resulting source program as you would any conventional C program.
The precompiler processes an application in two passes. In the first pass, the precompiler parses the Embedded SQL statements and variable declarations, checking the syntax and displaying messages for any errors it detects. If the precompiler detects no severe errors, it proceeds with the second pass, wherein it:
Adds declarations for the precompiler variables, which begin with “_sql”. To prevent confusion, do not begin your variables’ names with “_sql”.
Converts the text of the original Embedded SQL statements to comments.
Generates stored procedures and calls to stored procedures if you set this option in the precompile command.
Converts Embedded SQL statements to Client-Library calls. Embedded SQL uses Client-Library as a runtime library.
Generates up to three files: a target file, an optional listing file, and an optional isql script file.
For detailed descriptions of precompiler command line options,
see the Open Client and Open Server Programmers Supplement for
your platform.