Creating an ESQL/C program
About this task
To create an ESQL/C program:
Procedure
Results
The source
file can contain the following types of statements:
- Preprocessor directives
- preprocessor
directives to create simple macro definitions, include files,
and perform conditional compilation.
C preprocessor directives to create macro definitions, include system and C source files, and perform conditional C compilation.
- Language statements
- host
variable definitions to store data for transfer between the 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 source
code file name can have either of the following forms:
- esqlc_source.ec
- esqlc_source.ecp
The particular suffix that your 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.