Author |
Message
|
ajaymohini |
Posted: Wed Jun 08, 2016 5:10 am Post subject: CCSID Issue |
|
|
Novice
Joined: 27 Sep 2014 Posts: 10
|
I need your help on a issue that i am seeing in one of our flows.
We receive data from a Mainframe QM with CCSID as 37 and, the queue manager at our end is hosted on Unix and has CCSID as 819. Thing work fine when the XML data has no special characters. It fails when there is a japanese character and in exception it shows the input data as a3/4 or a1/4 kind of data and fails with "Unconvertible Characters". I see the Encoding as 546 and CCSID as 819 in the failed message.
When i tried to test by placing the message directly on the Unix QM, it goes through without any issue. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 08, 2016 5:47 am Post subject: Re: CCSID Issue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ajaymohini wrote: |
We receive data from a Mainframe QM with CCSID as 37 and, the queue manager at our end is hosted on Unix and has CCSID as 819. Thing work fine when the XML data has no special characters. It fails when there is a japanese character and in exception it shows the input data as a3/4 or a1/4 kind of data and fails with "Unconvertible Characters". I see the Encoding as 546 and CCSID as 819 in the failed message. |
If the message contains Japanese characters that can't be represented in CCSID 819, the MQMD is wrong to say 819. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ajaymohini |
Posted: Wed Jun 08, 2016 5:52 am Post subject: |
|
|
Novice
Joined: 27 Sep 2014 Posts: 10
|
Should it be set to 1208, but i see all our QM in Unix are 819 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 08, 2016 6:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ajaymohini wrote: |
Should it be set to 1208, but i see all our QM in Unix are 819 |
The setting in the QM is just what's used if the app doesn't set it.
The important point is that the application (if it's using a different CCSID from that default) is that it sets the CCSID correctly, and always to match the CCSID actually used for the payload. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 08, 2016 6:09 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If the message contains Japanese characters, and is written in CCSID 37...
the message is already broken... _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ajaymohini |
Posted: Wed Jun 08, 2016 6:23 am Post subject: |
|
|
Novice
Joined: 27 Sep 2014 Posts: 10
|
Thanks for your reply, is it right to assume since the source(Mainframe with CCSID as 37) is not setting the CCSID or setting it as 819 my application connecting to Unix QM picks it as 819.
I see a different interface where the message comes from a Linux QM which has CCSID as 1208 and the message when arrived in QM on UNIX it has CCSID as 1208 and not 819 even when the Unix QM has CCSID as 819. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 08, 2016 6:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ajaymohini wrote: |
Thanks for your reply, is it right to assume since the source(Mainframe with CCSID as 37) is not setting the CCSID or setting it as 819 my application connecting to Unix QM picks it as 819. |
No - set at the sending end. If you're using get with convert then the message will be converted from the CCSID in the MQMD to the receiving queue manager's default CCSID.
ajaymohini wrote: |
I see a different interface where the message comes from a Linux QM which has CCSID as 1208 and the message when arrived in QM on UNIX it has CCSID as 1208 and not 819 even when the Unix QM has CCSID as 819. |
1208 is a Unicode code page with can (probably) handle these characters. As stated above, if the application doesn't set it the QM CCSID will be used. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jun 08, 2016 6:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use amqsbcg (or amqsbcgc) to dump out the contents of one of the bad messages.
Confirm the CCSID of the message. Compare the values of the first few characters to see if they match the CCSID of the message. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
ajaymohini |
Posted: Thu Jun 09, 2016 12:41 am Post subject: |
|
|
Novice
Joined: 27 Sep 2014 Posts: 10
|
Once again Thanks for your quick responses, i have recommended the belwo options.
. The source on Mainframes set the CCSID to 1208, it seems they are not setting hence my Unix QM is using 819.
. Change the CCSID of the Unix QM to 1208, so that even if source doesnt set it will still work. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jun 09, 2016 4:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Regardless of what you set the CCSID of the queue managers to, if the message is labeled in one CCSID and the contents of the message are in a different one, you will not be able to convert it.
The message must agree with itself between the CCSID on the header and the one that properly represents the bytes in the message data. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 09, 2016 4:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Regardless of what you set the CCSID of the queue managers to, if the message is labeled in one CCSID and the contents of the message are in a different one, you will not be able to convert it.
The message must agree with itself between the CCSID on the header and the one that properly represents the bytes in the message data. |
Also be aware that if you change the CCSID of the queue manager to 1208, there's a good chance you'll break one of the other applications using it if they're making an assumption it's 819. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|