CHECK

Sends each SQL statement to the database at compilation time.

Syntax:

[NO]CHECK

Properties:

Default: NOCHECK

Dependencies:

CHECK requires that you also:
  • Set the DB compiler directive option, or identify the database using the DB2DBDFT environment variable.
  • If the connection to the database specified requires authentication, then the PASS compiler directive option is also required.

Scope:

Used at compile time: Yes
Behavior at run time: N/A

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

Depending on your driver and/or DBMS and in certain circumstances, CHECK does not flag invalid SQL statements.

You can specify the [NOCHECK], [ALSO CHECK], or [WITH CHECK] statement prefix to affect specific SQL statements. See SQL Statement Prefixes for CHECK Directive for complete information.

Important: For applications that use JDBC with the JVM Managed Runtime, be sure that your environment is configured appropriately. Otherwise, compilation could fail. See To create a JVM COBOL project for JDBC and Configuring the JDBC Run-time Environment for details.