Support Article
SQLCODE=-302 pyCommit Error saving pyLabel column to DB2
Summary
Seeing issue trying to save pyLabel property values to database when the property value includes special characters which are multi-byte.
Error Messages
pyCommitError: ** Problem writing an instance to the database: code: -302 SQLState:22001 Message: DB2 SQL Error: SQLCODE=-302 SQLSTATE=22001, SQLERRMC=null, DRIVER-3.62.56
Steps to Reproduce
Not Applicable
Root Cause
A defect or configuration issue in the operating environment.
A multi-byte character set encoding is being used but the database is using byte length semantics.
Resolution
Make the following change to the operating environment:
In some database user can specify the length to be byte or char at the column level but DB2 does not seem to have this option.
To avoid this issue increase the column size to accommodate multi-byte characters.
If the property includes 4 byte characters then in theory one should make the column 4 times as large.
In reality not every character will be multi-byte so there is actually no need to make it large.
Alter the pyLabel column to VARCHAR(96)
An enhancement request, FDBK-24744, has been created for consideration by Pega Product Management.Published February 26, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.