DB2 10.5 for Linux, UNIX, and Windows

RetryParameterBindingOnError CLI/ODBC configuration keyword

Sets the value that indicates whether failed statements, which are result of data type mismatch in their parameters, are rerun after implicitly recasting parameters.

db2cli.ini keyword syntax:
For DB2® for z/OS® Version 10 and later servers.
RetryParameterBindingOnError = "-420 | 0 | 1 | 420"
For all servers other than DB2 for z/OS Version 10 and later servers.
RetryParameterBindingOnError = "0 | 1 | 420"
Default setting:
1
Usage notes:
The CLI driver provides implicit casting of mismatched data types for a parameter to avoid application errors. If an application specified parameter data type does not match the actual data type of a database object, an error can be returned by the database server. By default, the data type mismatch error causes the CLI driver to implicitly recast the parameter after the describe statement is issued. The implicit recast has a negative performance impact as result of extra network flow from issuing the describe statement. You can disable implicit casting of parameters by setting the RetryParameterBindingOnError keyword to 0, which can help you to identify improper data types that are specified in an application.
0
A data type mismatch error from a database server for parameters is returned to the application.
1
A data type mismatch error from a database server for parameters triggers implicit recast of parameter data type and statement is issued again.
420 or -420
The 420 value represents absolute value of the SQL0420N error message.
420
When you specify the 420 value, the SQL0420N error also triggers implicit recast of parameter data type in addition to all recast scenarios that occur under the 1 value.

When your CLI application is connecting to the DB2 for z/OS Version 10 and later servers, 420 is the default value.

-420
The -420 value is valid only when your CLI application is connecting to DB2 for z/OS Version 10 and later servers. When you specify the -420 value, the implicit recast of parameter data type is disabled when the SQL0420N error is encountered. The -420 value is ignored when the target database is not DB2 for z/OS Version 10 and later servers.
In Version 10.5 Fix Pack 2 and later, the CLI driver supports the RetryParameterBindingOnError keyword. The CLI driver supports specifying SQL codes in the RetryParameterBindingOnError keyword syntax. When the specified SQL codes are returned by the server, the CLI driver attempts to implicitly recast the parameter.
Important:
  • The following SQL codes trigger implicit recast of parameter data type and reissue of the statement when the RetryParameterBindingOnError keyword is enabled:
    • SQL0171N
    • SQL0180N
    • SQL0181N
    • SQL0301N
    • SQL0302N
    • SQL0303N
    • SQL0304N
    • SQL0305N
    • SQL0404N
    • SQL0433N
    • SQL0461N
    • SQL0804N