Author |
Message
|
mqmike |
Posted: Thu Aug 31, 2006 8:44 am Post subject: Conversion problem with ! inside an XML message |
|
|
Acolyte
Joined: 09 Jul 2004 Posts: 63
|
We have a problem with some XML data that is being sent from z/OS to AIX. CCSID on z/OS is 500, CCSID on AIX is 819. We do not have message conversion on the channel. When the XML reaches AIX, the ! is replaced by ]. I'm thinking we have a conversion problem.
My response was to double check the application (convert on get etc) but then I read the document "Data Conversion Under MQ". This has the following...
If you have a problem with the conversion of some characters to or from EBCDIC, (especially the exclamation point), make sure that the z/OS queue manager CCSID matches the codepage the user is expecting the data in.
So should I be looking to change the CCSID on the mainframe queue manager? My impression has always been that queue manager CCSID's should be left alone and the application should handle things. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 31, 2006 6:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So are you posting your data in CCSID 500 or CCSID 37 ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqmike |
Posted: Thu Aug 31, 2006 10:29 pm Post subject: |
|
|
Acolyte
Joined: 09 Jul 2004 Posts: 63
|
Message is being sent from the mainframe so I assume it's being posted in CCSID 500. Where does 37 come from?
Just interested to know under which circumstances qmgr CCSID should be changed. I always thought it should be left untouched and that the application should handle conversion. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Aug 31, 2006 10:35 pm Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
You should have a look to
- the sending QMgr (is it CCSID 500?)
- the message in the XmitQ on the sendinging QMgr (again - is it CCSID 500)
The CCSID of the QMgr is used as default for the corresponding message attribute - but an application may override it. _________________ Regards
Hubert |
|
Back to top |
|
 |
mqmike |
Posted: Thu Aug 31, 2006 10:44 pm Post subject: |
|
|
Acolyte
Joined: 09 Jul 2004 Posts: 63
|
Thanks for the responses guys.
Regardless of what CCSID the message is being posted in though, surely if the message is format MQSTR and CONVERT_ON_GET are used, we shouldn't have a problem?
The only reason I can think that a qmgr's CCSID attribute should be changed is if the getting application doesn't handle conversion and can't be changed. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Aug 31, 2006 11:28 pm Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
mqmike wrote: |
Thanks for the responses guys.
Regardless of what CCSID the message is being posted in though, surely if the message is format MQSTR and CONVERT_ON_GET are used, we shouldn't have a problem?
The only reason I can think that a qmgr's CCSID attribute should be changed is if the getting application doesn't handle conversion and can't be changed. |
It's possible two create a message with CCSID xxx and write it onto a q on a QMgr with CCSID yyy. The application then should set the CCSID of the message to xxx (instead of using the QMgr's default yyy). There are several different formats which sometime only differ in some special characters (such as !). Conversion can only be successful, when the codeset used in the message matches with the CCSID set in the MQMD.
If the message is written with a CCSID which is not known on the target QMgr, you will get a conversion error. Then nothing will be converted. When the CCSID is known (and the message is format MQSTR and CONVERT_ON_GET is used), but some characters are not converted properly, I assume you use a wrong CCSID in your message.
When the getting application cannot handle conversion, none of the characters will be converted. This means, messages from z/OS (EBCDIC) are not readable at all on AIX (ASCII)! _________________ Regards
Hubert |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Sep 01, 2006 1:53 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqmike wrote: |
Message is being sent from the mainframe so I assume it's being posted in CCSID 500. Where does 37 come from?
Just interested to know under which circumstances qmgr CCSID should be changed. I always thought it should be left untouched and that the application should handle conversion. |
Well we do have some strange combinations floating around.
Exemple: mainframe is running on CCSID 37 (english EBCDIC). The queue manager on the mainframe however is running on CCSID 500 (international EBCDIC).
Now if you post a message in CCSID 37 as CCSID 500 you might get the little misrepresentation that you have. You would have to check the CCSID value for ! and ] in CCSID 37 and 500. If the hex value of the char ! in CCSID 37 = hex val of ] in CCSID 500 you have found your culprit !
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqmike |
Posted: Mon Sep 04, 2006 3:41 am Post subject: |
|
|
Acolyte
Joined: 09 Jul 2004 Posts: 63
|
Thanks for all your efforts guys.
It transpires that the z/OS queue manager CCSID was not the same as that used on the platform. |
|
Back to top |
|
 |
coyotebite |
Posted: Wed Jul 28, 2010 2:38 pm Post subject: How to determine platform CCSID on z/OS |
|
|
Newbie
Joined: 28 Jul 2010 Posts: 1
|
Always great to find a posting that nails a problem I'm having. A question though, in order to prove the CCSID 37 / 500 conversion issue to our mainframe folks, I need to determine the platform CCSID on the mainframe. Does anyone know how to do that ? Thanks for any help anyone can provide . |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Jul 28, 2010 4:50 pm Post subject: Re: How to determine platform CCSID on z/OS |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
coyotebite wrote: |
...I need to determine the platform CCSID on the mainframe... |
In other words, the CCSID that the application thinks it is using for character representation when it puts the MQ message data. Presumably the application does not explictly set the CCSID in the MQMD, so MQ is treating the data as the CCSID of the qmgr, 500.
I think you have the classic case of an app storing an "!" in CCSID 37 (hex code 5A), and MQ is treating it for conversion to ASCII as hex code 5A in CCSID 500, which is a "]".
Its generally not a good idea to change the CCSID of an existing qmgr as it could have far ranging implications for many apps that use it. The better choice is to modify the app code to set MQMD CCSID to what it is using internally, most likely 37.
There are 10 well known characters that are subject to accidental perbertatation in EBCDIC code pages 37, 500 and 1047. _________________ Glenn |
|
Back to top |
|
 |
zonko |
Posted: Wed Jul 28, 2010 10:46 pm Post subject: |
|
|
Voyager
Joined: 04 Nov 2009 Posts: 78
|
For future reference...
WMQ does not do the actual conversion on AIX (or HPUX). The conversion is handed off to the OS conversion routines, iconv() and its associated functions, converter files, etc.
On Solaris and Windows, WMQ does the conversion itself, using converter files (in proprietary format) issued by IBM.
Note that IBM also issues some converter files on HPUX to supplement the files supplied by the OS. |
|
Back to top |
|
 |
zpat |
Posted: Wed Jul 28, 2010 11:28 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I have had the same problem with a new z/OS queue manager installed by IBM GS with the default CCSID of 500. Once it was changed to 285 (UK Ebcdic) everything was fine.
It can be hard (or impossible) to adjust every application to set the MQMD.CCSID, so changing the default may be preferable, especially if other z/OS queue managers are correctly set up. |
|
Back to top |
|
 |
rekarm01 |
Posted: Thu Jul 29, 2010 2:08 am Post subject: Re: How to determine platform CCSID on z/OS |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
It's usually better to open up a new thread instead of reopening a 4-year old thread, particularly if the original thread started out in the wrong forum.
coyotebite wrote: |
A question though, in order to prove the CCSID 37 / 500 conversion issue to our mainframe folks, I need to determine the platform CCSID on the mainframe. Does anyone know how to do that?. |
Individual applications, (including compilers and display devices) are often configurable; if there is a unique "platform CCSID", it may not be relevant.
Regardless of the qmgr ccsid or underlying platform, for any message on a queue, the message header(s) need to accurately describe the message data. Browsing tools, such as sample program amqsbcg0, support pack IH03 - rfhutil, or support pack MO71 - WMQ GUI Admin tool, are useful for inspecting the message headers and data.
Typically, the sending application should make sure that the message headers match the message data, and the receiving application should convert incoming messages as needed.
gbaddeley wrote: |
There are 10 well known characters that are subject to accidental perbertatation in EBCDIC code pages 37, 500 and 1047. |
I count 9 characters:
Code: |
Hex. Value IBM-037 IBM-500 IBM-1047
0x4A ¢ [ ¢
0x4F | ! |
0x5A ! ] !
0x5F ¬ ^ ^
0xAD Ý Ý [
0xB0 ^ ¢ ¬
0xBA [ ¬ Ý
0xBB ] | ¨
0xBD ¨ ¨ ] |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 29, 2010 2:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Moved to MF forum.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Jul 29, 2010 3:44 pm Post subject: Re: How to determine platform CCSID on z/OS |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
rekarm01 wrote: |
gbaddeley wrote: |
There are 10 well known characters that are subject to accidental perbertatation in EBCDIC code pages 37, 500 and 1047. |
I count 9 characters:
Code: |
Hex. Value IBM-037 IBM-500 IBM-1047
0x4A ¢ [ ¢
0x4F | ! |
0x5A ! ] !
0x5F ¬ ^ ^
0xAD Ý Ý [
0xB0 ^ ¢ ¬
0xBA [ ¬ Ý
0xBB ] | ¨
0xBD ¨ ¨ ] |
|
A table I put together in 2002 for a related problem contained 10 characters of interest at the time. I defer to the much longer list for many EBCDIC code pages in Appendix F of the PDF "Data Conversion Under WebSphere MQ" at http://www-01.ibm.com/support/docview.wss?uid=swg27005729&aid=1 _________________ Glenn |
|
Back to top |
|
 |
|