|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Oracle Stored Procedure convert from ISO8859-8 failure |
« View previous topic :: View next topic » |
Author |
Message
|
alechko |
Posted: Tue Nov 18, 2008 8:24 am Post subject: Oracle Stored Procedure convert from ISO8859-8 failure |
|
|
Apprentice
Joined: 12 Jan 2005 Posts: 37
|
Hi there,
I am trying to invoke an Oracle stored procedure from a msgflow using ESQL. The oracle's CCSID is ISO8859-8:
Code: |
SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
VALUE = IW8ISO8859P8
|
After Calling the procedure I've noticed that the hebrew strings are returned as reversed '?' (spanish). My broker works UTF8 (1208).
I've tried casting the returned string to 916 but I receive an exception
Quote: |
BIP2136 Source character "bf00" in field ... cannot be converted from Unicode to codepage '916'. |
Here is my ESQL code:
Code: |
CREATE PROCEDURE merchantDetailsLevel1(IN parm CHAR, OUT parmOut CHAR, OUT returnCode FLOAT)
LANGUAGE DATABASE
EXTERNAL NAME "sapmainp.pk_check_pirtei_isra_ishur.pr_netunei_isra_ishur";
CREATE COMPUTE MODULE testSPFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
DECLARE merchantRet CHARACTER;
DECLARE returnCode FLOAT;
CALL merchantDetailsLevel1(InputBody.parm, merchantRet, returnCode);
SET OutputRoot.XMLNSC.parmOut = CAST(CAST(merchantRet AS BLOB CCSID 916) AS CHARACTER CCSID 1208);
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
|
Have I missed some configuration? Is there an ODBC parameter I need to set?
I've searched the forums before posting and found this similar unanswered post: http://www.mqseries.net/phpBB2/viewtopic.php?p=193704&sid=f4b3889a26f1d923c725451948ccaec2
I'd appreciate any ideas,
Alik |
|
Back to top |
|
 |
alechko |
Posted: Thu Nov 20, 2008 4:00 am Post subject: |
|
|
Apprentice
Joined: 12 Jan 2005 Posts: 37
|
After numerous attempts I managed to solve it.
I changed the procedure declaration to return a BLOB variable and casted the BLOB to CHARACTER:
Code: |
CREATE PROCEDURE merchantDetailsLevel1(IN parm CHAR, OUT parmOut BLOB, OUT returnCode FLOAT)
LANGUAGE DATABASE
EXTERNAL NAME "sapmainp.pk_check_pirtei_isra_ishur.pr_netunei_isra_ishur";
...
DECLARE merchantRet BLOB;
DECLARE returnCode FLOAT;
CALL merchantDetailsLevel1(InputBody.parm, merchantRet, returnCode);
SET OutputRoot.XMLNSC.parmOut = CAST(merchantRet AS CHARACTER CCSID 1208);
...
|
If anyone thinks of a better solution, I'd be glad to hear about it.
Thanks,
Alik |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 20, 2008 4:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looks about right. However if you are on Oracle 10g and above your database can be UTF-8 even though the OS is CCSID 819...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|