GEN-SQLCA

Generates an SQLCA equivalent to coding an EXEC SQL INCLUDE SQLCA statement in an application program.

Syntax:

[NO]GEN-SQLCA

Properties:

Default: NOGEN-SQLCA

Scope:

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

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

Comments:

If SQLCODE is defined in the application, the generated copybook defines SQLCODE and ensures that SQLCODE is updated appropriately on every SQL statement with that value.

If SQLSTATE is defined in the application, the copybook defines SQLSTATE and ensures that SQLSTATE is updated appropriately on every SQL statement with that value.

If SQLCODE or SQLSTATE is not defined in the application, the generated copybook defines them.

This behavior is equivalent to STDSQL(YES) on mainframe DB2 z/OS.