Declaring SQLCA

WARNING! Although SQLSTATE is preferred over SQLCODE and SQLCA, this version only fully supports SQLCODE. A future version will support SQLSTATE.

The syntax for declaring SQLCA is:

exec sql include sqlca; 

You can use the Embedded SQL include statement to include other files in your application the same way you would use the C preprocessor #include command. You can also set a precompiler command option to specify an include file directory. At precompile time, the precompiler searches the path specified in the C compile command. The precompiler uses the include file path to search for this file. It opens and reads the included file as if were part of the main file. If the included file cannot be found, the precompile fails.