Posted: Sun Sep 28, 2008 4:11 am Post subject: ASCII or Binary
Master
Joined: 13 Jun 2008 Posts: 284
Is there any attribute in MQ that can change the message data into ASCII or Binary?. Or must this be done at the application level that is talking to MQ?.
Posted: Sun Sep 28, 2008 8:09 am Post subject: Re: ASCII or Binary
Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
solomon_13000 wrote:
Is there any attribute in MQ that can change the message data into ASCII or Binary?. Or must this be done at the application level that is talking to MQ?.
In order to switch the message content you MUST be dealing with a text message (MQFMT_STRING) or javax.jms.TextMessage (same difference).
When you receive the message in MQ you will specify get with convert in the options. In JMS you do not have to specify anything.
Now the conversion will happen in CCSID terms.
In MQ you can indicate a destination CCSID on the MQMD passed to read the message. In JMS you would have to set the CCSID on the qcf/tcf.
By default the CCSID converted to, is the CCSID of the client requesting the message, or if in bindings connection, the CCSID of the qmgr serving the message.
Remember that not all CCSIDs have a conversion from one to another. The default conversion tables of the OS are used. You may also create some of your own conversion tables. Read up in the manuals if you need to do that.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum