Start of change

-4743 ATTEMPT TO USE NEW FUNCTION WHEN THE APPLICATION COMPATIBILITY SETTING IS SET FOR A PREVIOUS LEVEL

Explanation

An application or SQL object attempted to use a Db2 capability that is not supported by the current application compatibility (APPLCOMPAT) level. An example of this situation is an SQL statement that uses a reserved word that will be accepted a valid SQL syntax at a higher APPLCOMPAT level.

Start of changeThis message can be issued for a data definition statement that specifies functionality, or attempts to alter an existing object definition, that requires a higher APPLCOMPAT setting than is currently in use.End of change

If the message is issued for a CREATE TRIGGER or ALTER TRIGGER statement and the APPLCOMPAT level is V11R1 or lower, the following situations might apply:

  • The trigger body contains an SQL PL statement.
  • The trigger body contains an SQL statement that was not allowed in a trigger body in Db2 11.
  • The MODE DB2SQL clause is not present.
  • An unsupported trigger option that was not allowed in Db2 11 was specified. The only trigger options that are allowed in Db2 11 are SECURED and NOT SECURED.

This message can be issued for an ALTER statement if the CURRENT APPLICATION COMPATIBILITY special register value is lower than the APPLCOMPAT level of the existing object definition. Altering an object might result in this error even if the content of the ALTER statement is valid at the current level. The errors can occur when the existing object definition contains some functionality that requires a higher level than the CURRENT APPLICATION COMPATIBILITY special register setting.

System action

The statement cannot be processed.

Programmer response

Check the APPLCOMPAT level of your application or SQL object, and take one of the following actions:
  • Rebind the application or modify the SQL object to use an APPLCOMPAT level that supports the capability.
  • Remove use of the unsupported capability from the application or SQL object.
If an application receives this error for an SQL statement where it was expecting an invalid syntax error such as -104 or -199 at a lower Db2 code level, take the following actions:
  • Update the application to expect the SQLCODE -4743 error when it runs at the current Db2 code level.
  • Verify that the application will receive a correct result if the SQL statement is accepted at the higher APPLCOMPAT level, and take appropriate action.
Tip: Start of changeFor best results, configure your development environment to use the lowest application compatibility level that the application will run at in the production environment. For dynamic SQL, remember to consider the application compatibility levels of client and NULLID packages. If you develop and test applications at a higher application compatibility level and try to run them at a lower level in production, you are likely to encounter SQL code -4743 and other errors when you deploy the applications to production.End of change

For more information, see APPLCOMPAT levels in Db2 12.

SQLSTATE

56038

End of change