Default compilation order
After you have created the program file, you run the esql command on that file. By default, the preprocessor runs first and translates the embedded SQL statements in the program into function calls that communicate with the database server. The preprocessor produces a C source file and calls the C compiler. The C compiler then preprocesses and compiles your source file and links any other C source file, object file, or library file the same way as any other C program. If esql does not encounter errors in one of these steps, it generates an executable file. You can run the compiled program as you would any C program. When the program runs, it calls the library procedures; the library procedures set up communications with the database server to carry out the SQL operations.