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