Creating an ESQL/C program
To create an ESQL/C program:
The Informix ESQL/C source
file can contain the following types of statements:
- Preprocessor directives
- Informix ESQL/C preprocessor
directives to create simple macro definitions, include Informix ESQL/C files,
and perform conditional Informix ESQL/C compilation.
C preprocessor directives to create macro definitions, include system and C source files, and perform conditional C compilation.
- Language statements
- Informix ESQL/C host
variable definitions to store data for transfer between the Informix ESQL/C program
and the database server.
Embedded SQL statements to communicate with the database server.
C language statements to provide program logic.
For information about C preprocessor directives and C language statements, see a C programming text.
Your Informix ESQL/C source
code file name can have either of the following forms:
- esqlc_source.ec
- esqlc_source.ecp
The particular suffix that your Informix ESQL/C source file has determines the default order in which that source file gets compiled by the esql command. The .ec suffix is the default suffix. For more information about the .ecp suffix and the non-default order of compilation, see Run the C preprocessor before the ESQL/C preprocessor.