Header files included in your program
The preprocessor
automatically includes the following header
files in your program:
- The sqlhdr.h file provides cursor-related
structures for your program.
This header file automatically includes the sqlda.h and ifxtypes.h header files.
- The sqlca.h file, which allows your program to check the success or failure of your statements with the SQLSTATE or SQLCODE variable
Restriction: Although you can now use an ANSI C compiler,
the preprocessor
does not fully support ANSI C, so you might not be able to preprocess
all programs that follow the ANSI C standards.
To include any of the other header files in your program,
you must use the include preprocessor directive. However, you
only need to include the header
file if your program refers to the structures or the definitions that
the header file defines. For example, if your program accesses datetime
data, you must include the datetime.h header
file, as follows:
EXEC SQL include datetime.h;
Make sure to terminate the line of code with a semicolon. Some
additional examples follow:
EXEC SQL include varchar.h;
EXEC SQL include sqlda;
$include sqlstype;
Tip: You do not have to
enter the .h file extension for the header
file; the esql preprocessor assumes a .h extension.