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.