Delimit SQL statements with EXEC SQL and END-EXEC. The EXEC SQL and END-EXEC delimiters must each be complete on one line. You cannot continue them across multiple lines.
You also need to do these special steps:
Restriction: You cannot use SQL statements in object-oriented classes or methods.
related tasks
Using SQL INCLUDE with the DB2 coprocessor
Using character data in SQL statements
Using national decimal data in SQL statements
Using national group items in SQL statements
Using binary items in SQL statements
Determining the success of SQL statements
DB2 Application Programming and SQL Guide (Coding SQL statements in a
COBOL application)