Problem:
If you use the ESQL Assistant to create host variable declarations and then compile with the DB2(...) directive then you will get syntax errors on the SQL TYPE IS clauses on the variable declarations.
Resolution:
The SQL TYPE IS syntax is designed for OpenESQL (ODBC) precompiler and is not compatible with the IBM DB2 precompiler.
In Net Express you can use the menu option Options / Embedded SQL. On this dialog there is a checkbox to disable the use of SQL TYPE declarations.
If you use this the code should compile with the DB2(..) directive.