Author |
Message
|
usakvs |
Posted: Thu Oct 05, 2006 7:28 am Post subject: ASCII to EBCDIC |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
Hi
I have a setup where my mqclient in solaris is sending ASCII text to Main frame Queue Manager. After browsing the queue, I found all junk characters. I dont have any clue where I need to specify the conversion.
I have set CCSID 500 while sending the message from solaris reason is that Queue manager in MF has also same CCSID.
I am currently using SERVERCONNECTION channel between these 2 boxes. While receiving the messages also, I get junk characters.
I will deeply appreciate if anyone could guide me to come out from this problem |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 05, 2006 7:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Conversion is an option on the message get.
Look it up in the programming manual for further information on the option. Indeed, the manuals are a good place for all sorts of clues.
Happy Reading  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Oct 05, 2006 7:55 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Don't set a CCSID on the put MQMD unless it is the actual one that describes the message data at the moment the PUT is executed.
It sounds like you have set an EBCDIC CCSID (500) on the MQMD when the message data is ASCII (eg 850). MQPUT does not convert data.
When the message data's codepage is correctly described in the MQMD, the MQGET with MQGMO_CONVERT will work.
If you let it default the MQMD CCSID will match the client platform, which is usually correct unless you want to send Unicode in which case set the CCSID to the one that matches the data you have put in the message. |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 05, 2006 8:44 am Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
What about for inbound messages? I dont use any APIs in solaris. SUN SeeBeyond JCAPS product will receive the message back from Mainframe.
Do I need to do any customised setting to handle the conversion then?
One thing I still dont understand is that on the Mainframe side if they dont use any APIs then how will the conversion work? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 05, 2006 9:20 am Post subject: |
|
|
Guest
|
on all platforms conversion works like this:
qmgrs exchange info about their ccsids at channel attach time.
if the sender channel has the CONVERT attribute, and the two platforms have different ccsids, the message will be converted before it is sent to the receiving side.
if CONVERT is not specified, and the two platforms have different ccsids, and the getting application has specified MQGMO_CONVERT, then the message will be converted before it is handed to the application.
If the getting app doesn't use any api's, how does the getting app get the message from the queue? Or, exactly how does the getting application get the message from the queue? What programming language? JAVA? |
|
Back to top |
|
 |
tleichen |
Posted: Thu Oct 05, 2006 10:16 am Post subject: Re: ASCII to EBCDIC |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
usakvs wrote: |
Hi
I have a setup where my mqclient in solaris is sending ASCII text to Main frame Queue Manager. After browsing the queue, I found all junk characters. I dont have any clue where I need to specify the conversion.
|
First of all, how are you browsing the queue? If you are using the ISPF panels, then try looking at them in hex. You will most likely find that they are the same characters that you sent in. You can't go by the displayed characters, because mainframe is EBCDIC, and the data you sent is ASCII. There is nothing wrong with the message. Zpat is right, you should not need to specify the CCSID in the MD. That is propagated automatically by the platform. Read the programming manual about how and where character conversion takes place.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 05, 2006 10:22 am Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
The getting app use one adapter which gets the message from MF queue and puts in a file. I am not using any API to browse the message. I expect a straight and clean ASCII text from MF but unfortunately not getting that.
Is there any way to set any option in SERVERCONNECTIOn channel attributes? |
|
Back to top |
|
 |
tleichen |
Posted: Thu Oct 05, 2006 10:24 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
usakvs wrote: |
I expect a straight and clean ASCII text from MF but unfortunately not getting that.
|
You're not a mainframe person, I take it?  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 05, 2006 10:25 am Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
On the MF side they might be using ISPF panels to browse the message. Do they need to browse the message in any particular way? If so let me know so that I can tell them to view the message in that manner. |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 05, 2006 10:27 am Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
Yes tleichen, I am not MF person |
|
Back to top |
|
 |
tleichen |
Posted: Thu Oct 05, 2006 10:30 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
Okay, then if you turn hex on in the browse window, you should see that the ascii data is exactly as you sent it, as long as you haven't put in some sort of conversion exit.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 05, 2006 11:01 am Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
What exactly I need to tell MF MQ people for this? In their browsing window they need to set to HEX to see ASCII text?
What about for receiving side? On solaris do I need to set any settings or its something MF people should take care of while sending the messages back? |
|
Back to top |
|
 |
tleichen |
Posted: Thu Oct 05, 2006 11:21 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
First, you need to understand how conversion is done with MQSeries. Perhaps this can help:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
In the browse window on the mainframe, they can set hex on to see the hexadecimal representation of the data they are viewing. They will NOT see "ASCII text", because the mainframe's native codeset is EBCDIC, and I don't think there is a way to tell the ISPF browser to display anything in ASCII, so the graphic representation you will see for the ASCII characters will appear to be "garbage". That is why you need to look at them in hex.
Read the info at the link above, and it may explain how you need to orchestrate conversion (in both directions). It is pretty automatic and transparent to the platform, if you follow the rules.  _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
zpat |
Posted: Thu Oct 05, 2006 11:31 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Client channels cannot convert messages AFAIK.
Unless your message passes between queue managers you can't use channel conversion.
Choose one of these:
MQGET with MQGMO_CONVERT on the receiving application. If it doesn't have that option - tell the vendor their MQ adapter is not good enough.
Send the message in the target code page (ie convert it in your sending application before the MQPUT).
Pass it through another application that does perform a MQGET with MQGMO_CONVERT
Send it to another queue manager (convert on channel) and back again!
---
Remember with MQ client connected applications, the relevant "platform" is the MQ client platform - NOT the queue manager's - this is not always understood. |
|
Back to top |
|
 |
usakvs |
Posted: Thu Oct 12, 2006 12:43 pm Post subject: |
|
|
Newbie
Joined: 04 Oct 2006 Posts: 9
|
I have been successful in getting the message in desired format on MF side after we added MQGMO_CONVERT option set to YES.
Now, my question is what do I tell MF people to send ASCII format to Solaris so that I can see the same message what they send to me?
Thank you all for your wonderful suggestion on MQGET and expecting similar suggestion for MQPUT as well. |
|
Back to top |
|
 |
|