CURRENT APPLICATION COMPATIBILITY

CURRENT APPLICATION COMPATIBILITY specifies the application compatibility level support for dynamic SQL statements in packages.

The data type is VARCHAR(10).

Set the value with the SET CURRENT APPLICATION COMPATIBILITY statement.

For packages, the initial value is determined by the value of the APPLCOMPAT bind option. For a user-defined functions or stored procedures, the initial value is inherited according to the rules in Special registers in a user-defined function or a stored procedure. Start of changeFor advanced triggers, the initial value is V12R1.End of change

The following CURRENT APPLICATION COMPATIBILITY values are supported to specify the application compatibility behavior of dynamic SQL statements:

Start of changeVvvRrMmmmEnd of change
Start of changeCompatibility with the behavior of the identified Db2 function level. For example, V12R1M510 specifies compatibility the highest available function level. The equivalent function level or higher must be activated. For a list of supported Db2 12 function levels, see Db2 12 function levels. End of change
Start of changeV12R1End of change
Start of changeCompatibility with the behavior of Db2 12 function level 500. This value this value has the same result as specifying V12R1M500.End of change
V11R1
Compatibility with the behavior of Db2 11 new-function mode. After migration to Db2 12, this value has the same result as specifying V12R1M100.
V10R1
Compatibility with the behavior of DB2® 10 new-function mode.
Example: Set the host variable CS to the compatibility level.
  EXEC SQL SET :CS = CURRENT APPLICATION COMPATIBILITY;