EXECSQL-FLAG

The DB2 preprocessor and coprocessor have certain known differences with respect to EXEC SQL processing, which results in some EXEC statements being accepted by one but not by the other.

This directive defines whether syntax reporting should emulate that of the DB2 preprocessor, the DB2 coprocessor, or to allow all syntax variations of both.

Syntax:

>>-.---.---.-EXECSQL-FLAG-.------------.--.---><
   +-/-+   |              +-"argument"-+  |
           +-NOEXECSQL-FLAG---------------+

Parameters:

argument
Must be one of:
preprocessor
Emulate syntax error reporting of the preprocessor.
coprocessor
Emulate syntax error reporting of the coprocessor.

Properties:

Default: NOEXECSQL-FLAG
Phase: Syntax check
$SET: Any

Comments:

Known differences include whether:

  • EXEC statements are valid in Area A - permitted when EXECSQL-FLAG"COPROCESSOR" is set.
  • trailing text after END-EXEC is errored or ignored - permitted when EXECSQL-FLAG"PREPROCESSOR" is set.
  • a period is mandatory after EXEC SQL INCLUDE .. END-EXEC - permitted when EXECSQL-FLAG"PREPROCESSOR" is set.

The default value (NOEXECSQL-FLAG) produces no syntax reporting; that is, it allows syntax variations for both the preprocessor and the coprocessor.