Author |
Message
|
EnthusiasticSatya |
Posted: Mon Jan 09, 2012 3:53 am Post subject: Setting CCSID to 1208 |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
Hi All,
I need to set the CCSID to 1208 in the code, so that the special character gets inserted in the database.
(SAP -->WMB-->MDB)
When I set the code page to 1208 via RFHutil and then push the message , then data havinfg special character gets succesfully inserted in the Database.(the character is û.)
But when I am trying to set the same in ESQL node, the data is not getting inserted in the correct format(Cyrilic character which is getting inserted is â.)
In Debug , I am able to set al the properties set correctly.
Code which I am using is the below one.
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
SET OutputRoot.Properties.CodedCharSetId=1208;
SET OutputRoot.MQMD.CodedCharSetId=1208;
SET OutputRoot.MQMD.Format= MQFMT_STRING ;
SET OutputRoot.XMLNSC.ns:ESB_Msg.Payload = CAST(ASBITSTREAM(InputRoot.XMLNSC.ns:ESB_Msg.Payload CCSID InputProperties.CodedCharSetId
ENCODING InputRoot.Properties.Encoding) AS CHARACTER CCSID InputProperties.CodedCharSetId ENCODING InputRoot.Properties.Encoding);
Please let me know for nay suggestion. |
|
Back to top |
|
 |
ruchir123 |
Posted: Mon Jan 09, 2012 4:07 am Post subject: |
|
|
Acolyte
Joined: 04 Jan 2012 Posts: 58
|
Hi Satya,
I think in your cast function you are using CCSID as 'InputProperties.CodedCharSetId' which may not be '1208' , so please try by replacing 'InputProperties.CodedCharSetId' with '1208'.
Hope it helps.  |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Jan 09, 2012 4:15 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
How is your SAP sending these messages? If SAP / adapter produces valid utf-8 encoded xml documents your incoming message should also have 1208 in CodedCharSetId?
--
Marko |
|
Back to top |
|
 |
EnthusiasticSatya |
Posted: Mon Jan 09, 2012 4:20 am Post subject: |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
Hi,
SAP is sending the data in UTF-8 format.
Right now I am pushing the data saved in UTF-8 format encoding to check if it is inserting the data successfully in the database.
The problem here is that , CCSID is not setting properly to 1208 via code. But works correctly when set via RFHutil.
@ruchir123 : I am trying to change 'InputProperties.CodedCharSetId' with '1208' and then check if this works.
Thanks for the suggestion. |
|
Back to top |
|
 |
EnthusiasticSatya |
Posted: Mon Jan 09, 2012 5:11 am Post subject: |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
Hi ruchir123,
I tried to change 'InputProperties.CodedCharSetId' with '1208' but it is also not inserting in the correct format (the character is ûinstead it is inserting as â.).
Please let me for any other solutions. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Jan 09, 2012 5:19 am Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
You should study more about the relation between character set in which the bytestream of the MQ message payload was created and the CCSID assigned to the message carrying it.
--
marko |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 09, 2012 10:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
marko.pitkanen wrote: |
Hi,
You should study more about the relation between character set in which the bytestream of the MQ message payload was created and the CCSID assigned to the message carrying it.
--
marko |
You should also look at the charset used by the platform that is putting the message to the DB and the charset of the DB as well as the charset of the DB platform...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
EnthusiasticSatya |
Posted: Mon Jan 09, 2012 9:23 pm Post subject: |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
Hi,
I asked SAP to push the data with the special character (<Nickname>УЛ.КУЙБЫШЕ</Nickname> ..I cannot see the CCSID from SAP ,but for sure the CCSID is not 1208 .
Because as per my structure SAP-->WMB QUEUE A --> 1 flow
WMB QUEUE A --Java compute node --> WMB output queue (MDB) --2nd Flow. We have reimported the BAPI as UTF-8.
Ealier , WMB Queue A was not able to accept the data from SAP , after setting CCSID after sap adapter to 1208 in ESQL, the data reached to WMB QUEUE A.
I have also set the MQ format to MQSTR. The data is reaching to WMB Output queue (MDB ) and is inserting to database.
But the field nickname is not inserting properly in the database.
It is inserting as a dot (.).
DECLARE CCCode INTEGER;
SET CCCode = 1208;
SET OutputRoot.Properties.CodedCharSetId=CCCode ;
SET OutputRoot.MQMD.CodedCharSetId=CCCode ;
SET OutputRoot.MQMD.Format= MQFMT_STRING ;
-- SET OutputRoot.XMLNSC.(XML.XmlDecl).(XML.Encoding) = 'UTF-8';
---- SET ReqAsBlob = ASBITSTREAM(InputRoot.XMLNSC.ns:ESB_Msg.Payload);
-- SET payload=CAST(ReqAsBlob AS CHARACTER CCSID 1208);
-- SET OutputRoot.XMLNSC.ns:ESB_Msg.Payload =payload;
SET OutputRoot.XMLNSC.ns:ESB_Msg.Payload = CAST(ASBITSTREAM(InputRoot.XMLNSC.ns:ESB_Msg.Payload CCSID InputProperties.CodedCharSetId
ENCODING InputRoot.Properties.Encoding) AS CHARACTER
CCSID InputProperties.CodedCharSetId ENCODING InputRoot.Properties.Encoding); |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 09, 2012 10:08 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
There is a function on the SAP (JCO) adapter to pass information on the ccsid of the SAP system. What answer do you get if you invoke it?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
EnthusiasticSatya |
Posted: Mon Jan 09, 2012 10:31 pm Post subject: |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
While reimporting the JCO Adpater (BAPI), the only option which I saw in Advance Tab (Additional connection configuration ), is to select the UTF-8 in the drop down of Partner Character set.
I am not sure about the other function to pass the CCSID of the SAP System.
Please let me know how to check this. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jan 09, 2012 10:42 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Your SAP Basis Team should be able to tell you what CCSID they are using as default.
If you can see the hex values in your test string then you should be able to find out what CCSID the message is in.
This site has the UTF8 codepage mapped out. The page I've pointed you at has the Cryllic characters ready for you to peruse.
http://dev.networkerror.org/utf8/?start=900&end=1000&cols=4
This other site has a number of other code pages that might help
http://www.i18nguy.com/unicode/codepages.html
These include PC-855, PC-866 and ISO-8859-5
Compare the actual HEX values you get from SAP (even better if you can find them in the SAP Database) with the values in the differen CCSID's.
I do however expect that it is UTF data that you are getting. AFAIK, this is the default for all SAP Systems. Well, every SAP system I've encountered uses it. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
marko.pitkanen |
Posted: Mon Jan 09, 2012 11:12 pm Post subject: |
|
|
 Chevalier
Joined: 23 Jul 2008 Posts: 440 Location: Jamsa, Finland
|
Hi,
You can check the CCSID that SAP / adapter assigns to messages by stopping the flow 1 and check the the message from flows input queue with for example MQExplorer.... or with user trace, debugger or trace node (${Root}).
If the payload is UTF-8 the CCSID should perhaps be 1208.
--
Marko |
|
Back to top |
|
 |
EnthusiasticSatya |
Posted: Tue Jan 10, 2012 3:29 am Post subject: |
|
|
Apprentice
Joined: 10 Aug 2011 Posts: 26
|
Hi,
SAP confirmed me that the data is sent in ISO-8859-1 format.So it not in UTF-8 format. |
|
Back to top |
|
 |
|