In DB2® for z/OS® Version 11 and later versions, you can specify whether you want applications to run by using the features and behavior of the current DB2 for z/OS version or of a previous DB2 for z/OS version. For CLI and .NET applications that connect to DB2 for z/OS Version 11 or later data servers, you can control the application compatibility behavior in several ways.
A DB2 for z/OS subsystem that you migrate to a new version goes through several phases. The first phase is conversion mode, in which functions of the new version are not yet available to the system, and the last phase is new-function mode, in which functions of the new version are available. If there is a behavior change between DB2 for z/OS versions, an SQL application uses the old behavior in conversion mode. Application compatibility enables applications that have incompatibilities with the new DB2 for z/OS version to maintain SQL compatibility with a previous DB2 for z/OS version when the subsystem is in new-function mode. Using application compatibility provides a window for adopting new function and making changes to accommodate incompatibilities. Also, with application compatibility, you can introduce new SQL functions or wait until later when you move to new-function mode.
In the following example, the APPLCOMPAT special register is specified in the <specialregisters> subsection of db2dsdriver.cfg configuration file:
<configuration>
<dsncollection>
<dsn alias="sample" name="sample" host="hotelfvt02.torolab.ibm.com" port="21169"/>
<specialregisters>
<parameter name="CURRENT APPLICATION COMPATIBILITY" value="V11R1"/>
</specialregisters>
</dsn>
<dsn alias="sample" name="sample" host="hotelfvt02.torolab.ibm.com" port="21169"/>
</dsn>
</dsncollection>
<databases>
<database name="sample" host="hotelfvt02.torolab.ibm.com" port="21169">
<specialregisters>
<parameter name="CURRENT APPLICATION COMPATIBILITY" value="V10R1"/>
</specialregisters>
</database>
<database name="sample2" host="hotelfvt02.torolab.ibm.com" port="21169">
</database>
</databases>
<parameters>
<specialregisters>
<parameter name="CURRENT APPLICATION COMPATIBILITY" value="V10R1"/>
</specialregisters>
</parameters>
</configuration>
After a connection is established to the data source name sample ('dsn=sample'), the first attempt to run an SQL statement sets the CURRENT APPLICATION COMPATIBILITY special register to V11R1. The special register that is specified inside the <specialregisters> subsection of the <dsn> section has precedence over other sections. The <specialregisters> subsection in the <dsn> section takes precedence over the <specialregisters> subsection in the <database> section. The <specialregisters> subsection in the <database> section takes precedence over the <specialregisters> subsection in the <parameters> section.
After a connection is established to the data source name sample2 ('dsn=sample2'), the first attempt to run an SQL statement sets the CURRENT APPLICATION COMPATIBILITY special register to V10R1. The special register is set to V10R1 since it is only found in the <parameters> section.