Troubleshooting
Problem
When using an IBM WebSphere Transformation Extender (WTX) / IBM Transformation Extender (ITX) map to insert 'character long object' (CLOB) data into the Oracle database via a stored procedure, you will encounter an error
Symptom
The call will fail and the error message reported in the DBL database trace is : Returned status: (-1100) One_or_more_columns/parameters_are_of_an_unsupported_datatype
Cause
As per Oracle adapter documentation - "There are no restrictions or limitations when using the Oracle Adapter. However, the BLOB, CLOB, and NCLOB data types are not supported as parameters for stored procedures." (http://www.ibm.com/support/knowledgecenter/SSVSD8_9.0.0/com.ibm.websphere.dtx.adaporacl.doc/concepts/c_oracle_Restrictions_and_Limitations.htm)
Diagnosing The Problem
Using the LASTERRORMSG() function or examination of the database trace will show the error message - "One_or_more_columns/parameters_are_of_an_unsupported_datatype"
Resolving The Problem
LONG may be a suitable replacement datatype. The LONG type will support data sizes in the Gigabyte range. The LONG parameter can then be converted and processed by the stored procedure as a CLOB type.
The following PL/SQL code shows how this could be done:
CREATE TABLE clobtest (x int, y clob);
CREATE OR REPLACE PROCEDURE pclobtest( nID int, lArg LONG ) AS
cPart VARCHAR2(32767);
cTest CLOB;
nLen NUMBER;
nTot NUMBER;
done BOOLEAN;
BEGIN
DBMS_LOB.CREATETEMPORARY(cTest, false);
IF lArg IS NOT NULL THEN
nLen := length(lArg);
nTot := 1;
done := false;
ELSE
nLen := -1;
nTot := -1;
done := true;
END IF;
WHILE NOT done LOOP
IF nTot <= nLen THEN
cPart := substr( lArg, nTot, 32767 );
nTot := nTot + 32767;
DBMS_LOB.WRITEAPPEND(cTest, length(cPart), cPart);
ELSE
done := true;
END IF;
END LOOP;
IF nLen >= 0 THEN
insert into clobtest values (nID, cTest);
ELSE
insert into clobtest values (nID, NULL);
END IF;
DBMS_LOB.FREETEMPORARY(cTest);
END;
/
Was this topic helpful?
Document Information
More support for:
IBM Transformation Extender
Software version:
8.3, 8.4, 8.4.1, 9.0
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows, z/OS
Document number:
275737
Modified date:
29 September 2018
UID
swg21980936