IBM Support

IBM Information Analyzer column analysis fails with "String data, right truncated".

Troubleshooting


Problem

IBM Information Analyzer column analysis fails with "ODBC function "SQLExecute" reported: SQLSTATE = 22001: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle Wire Protocol driver]String data, right truncated. Error in parameter 21".

Symptom

IBM Information Analyzer column analysis fails when string data is right truncated error:
"ODBC function "SQLExecute" reported: SQLSTATE = 22001: Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle Wire Protocol driver]String data, right truncated. Error in parameter 21. (CC_OdbcDBStatement::executeInsert, file CC_OdbcDBStatement.cpp, line 829)".

Cause

When the data passed in exceeds the SQL width right truncated issues occurs.

Environment

Information Analyzer ODBC Connection

Diagnosing The Problem

While running Column Analysis in IBM Information Analyzer retain datastage scripts, which stores the job logs in IBM DataStage Director client.
1) Login into Director Client
2) In Analyzer project, under IA folder, open Column Analysis job log and check for the ODBC Function error SQLSTATE = 22001 Native Error Code = 0: Msg = [IBM(DataDirect OEM)][ODBC Oracle Wire Protocol driver]String data, right truncated. Error in parameter 21. (CC_OdbcDBStatement::executeInsert, file CC_OdbcDBStatement.cpp, line 829)".

Resolving The Problem

32-bit Windows
Add two parameters to your DSN definition in the Windows Registry as follows:
1) Use the Run utility in the Windows Start menu to run REGEDIT.
2) Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\DSN_name folder.
3) Right-click on your DSN_name and select Add -> String Value.
4) Enter ColumnSizeAsCharacter
5) Right-click on ColumnSizeAsCharacter and select Modify.
6) Enter a value of 1.

64-bit Windows
Add two parameters to your DSN definition in the Windows Registry as follows:
1) Use the Run utility in the Windows Start menu to run REGEDIT.
2) Navigate to the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\DSN_name folder.
3) Right-click on your DSN_name and select Add -> String Value.
4) Enter ColumnSizeAsCharacter
5) Right-click on ColumnSizeAsCharacter and select Modify.
6) Enter a value of 1.

Linux and UNIX
Insert the following parameters under your DSN in the ODBC.INI file:
ColumnSizeAsCharacter=1

[{"Product":{"code":"SSZJLG","label":"InfoSphere Information Analyzer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"11.3;11.3.1.0;11.3.1.1;11.3.1.2;11.5;11.5.0.1;8.7;8.7.0.1;8.7.0.2;9.1;9.1.0.1;9.1.2.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

More support for:
InfoSphere Information Analyzer

Software version:
11.3, 11.3.1.0, 11.3.1.1, 11.3.1.2, 11.5, 11.5.0.1, 8.7, 8.7.0.1, 8.7.0.2, 9.1, 9.1.0.1, 9.1.2.0

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
556235

Modified date:
16 June 2018

UID

swg21993576

Manage My Notification Subscriptions