About this task
You also need to
do these special steps:
- Code an EXEC SQL INCLUDE statement to
include an SQL communication area (SQLCA) in the WORKING-STORAGE
SECTION or LOCAL-STORAGE SECTION of the
outermost program. LOCAL-STORAGE is recommended for
recursive programs and programs that use the THREAD compiler
option.
- Define all host variables that you use in
SQL statements in the WORKING-STORAGE SECTION, LOCAL-STORAGE
SECTION, or LINKAGE SECTION. However, you
do not need to identify them with EXEC SQL BEGIN DECLARE SECTION and EXEC
SQL END DECLARE SECTION.
Restriction: You cannot use SQL
statements in object-oriented classes or methods.
You can use SQL statements even for large objects
(such as BLOB and CLOB) and compound SQL.