Author |
Message
|
vignesh1988 |
Posted: Thu May 30, 2013 7:01 pm Post subject: MQ Data Conversion Issue |
|
|
Acolyte
Joined: 13 Apr 2013 Posts: 62 Location: Chennai
|
I send Messages from AIX (CCSID = 819) to Mainframe (CCSID = 500).
The message in AIX looks like:
SKDJFHSKDJ23@#$#%%$!@!2[[[[[]]]]]
When i browse in Mainframe the same message look like:
SKDJFHSKDJ23@#$#%%$|@|2¢¢¢¢¢!!!!!
So Some Characters are not been converted properly like [ ] ! etc.. Is this a CCSID problem? I also tried in Different platforms but same issue when comes to Mainframe.
The Message was PUT using amqsput. When i try to unload the message to a dataset, Characters are same.
Please advise me what could be the problem. |
|
Back to top |
|
 |
zpat |
Posted: Thu May 30, 2013 9:53 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Put does not convert data. Optionally Get will convert data.
Make the CCSID match the data in the message when putting. Ensure you use characters that are available in both codepages. Ensure the format is set to MQSTR
UTF-8 is probably a better choice than Ascii for sending the message. |
|
Back to top |
|
 |
vignesh1988 |
Posted: Thu May 30, 2013 10:00 pm Post subject: |
|
|
Acolyte
Joined: 13 Apr 2013 Posts: 62 Location: Chennai
|
yes, But CONVERT(YES) for the sender Channel... So it must convert i hope... The Message format is MQSTR.
Also can you explain the below phrase:
"Make the CCSID match the data in the message when putting. Ensure you use characters that are available in both codepages"
How to send UTF-8 format message? Please advise |
|
Back to top |
|
 |
zpat |
Posted: Thu May 30, 2013 11:25 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Using convert on channel is not best practice. However some sites do use it rather than fixing their getting applications.
How to create a UTF-8 message depends on the application language creating the message.
You need to analyse the message data in hex - work out what you are sending, and what you are getting. Then look at the codepage tables for conversion between the two character sets to see what is expected to happen.
If you view the message using support pac MO71 you can opt to format it in hex so you can see the exact data, however remember to select "convert" off in MO71 beforehand. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri May 31, 2013 5:02 am Post subject: Re: MQ Data Conversion Issue |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
vignesh1988 wrote: |
I send Messages from AIX (CCSID = 819) to Mainframe (CCSID = 500).
The message in AIX looks like:
SKDJFHSKDJ23@#$#%%$!@!2[[[[[]]]]]
When i browse in Mainframe the same message look like:
SKDJFHSKDJ23@#$#%%$|@|2¢¢¢¢¢!!!!!
I also tried in Different platforms but same issue when comes to Mainframe.
Please advise me what could be the problem. |
This is expected behavior, as AIX uses ASCII character coding, while z/OS uses EBCDIC. When your ASCII data arrives on the z hardware, the z/OS utility (editor) you use to view the data doesn't understand (and convert) ASCII character coding.
WMQ has data conversion help for you. Read this: http://www-01.ibm.com/support/docview.wss?uid=swg27005729 _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
zpat |
Posted: Fri May 31, 2013 5:38 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Not exactly the case Bruce, since the alphabetic characters are readable on the mainframe.
Data has been converted but some of the special chars are not the same.
My instruction to the OP is to find our the underlying hex byte value of these characters before and after the conversion and see what they are. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri May 31, 2013 6:07 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
The OP can use the PDF editor, set HEX ON, to view the data in hex format to see the data in its hex format. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Jun 02, 2013 3:27 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
bruce2359 wrote: |
The OP can use the PDF editor, set HEX ON, to view the data in hex format to see the data in its hex format. |
Good idea. If the msg has not been converted by a channel agent it should be on the mainframe queue in CCSID 819 and Format MQSTR and the msgdata should be in ASCII.
MQGET can convert it, but be careful with the target CCSID that it is going to use (initial CCSID in the MQMD passed into MQGET). If it is 500, and the consumer program is using 37, some character codes will not be converted as expected by the program.
Some terminal emulators may display characters differently, so check the CCSID of that too. _________________ Glenn |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Jun 05, 2013 1:41 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
vignesh1988 wrote: |
"Make the CCSID match the data in the message when putting. Ensure you use characters that are available in both codepages"
How to send UTF-8 format message? Please advise |
The ISO ccsid (819) and EBCDIC ccsids (37, 500, 1047, etc.) use the same character set, so there's no data loss converting between them.
Switching to UTF-8 instead (1208) won't solve this issue. The problem is, as gbaddeley indicated, most likely that the consumer or display is expecting a different EBCDIC ccsid (such as 37 or 1047). |
|
Back to top |
|
 |
|