DB2 10.5 for Linux, UNIX, and Windows

Code page conversion string-length overflow in mixed code set environments

In EUC and DBCS unequal code page environments, situations can occur after conversion takes place when there is not enough space allocated in a column to accommodate the entire string. In this case, the maximum expansion will be twice the length of the string in bytes. In cases where expansion does exceed the capacity of the column, SQLCODE -334 (SQLSTATE 22524) is returned.

This leads to situations that might not be immediately obvious or previously considered as follows:
When you design applications for mixed code set environments, you should refer to the appropriate documentation if you have any of the following situations:

In these situations, conversions might occur according to the application code page instead of the database code page.

Other situations that you need to consider are those in which the character conversion results in a string length beyond the limit for the data type, and code page conversions in stored procedures: