ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ Java / JMScoonversion of Message

Post new topicReply to topic
coonversion of Message View previous topic :: View next topic
Author Message
madhoo
PostPosted: Wed Oct 10, 2007 2:48 am Post subject: coonversion of Message Reply with quote

Newbie

Joined: 27 Oct 2006
Posts: 8

HI All,
we are using Java,JMS MQ we are sending message from our Qmanager which is on AIX CCSID is 819 to Remote QueueManager which is on zos/mainframe system CCSID is 500 both MQ version is MQv6.0

we defined Queue's channels and able to communicate and send messages but the format we send is not delivered in same formate to remote Qmanager, alphabets are converted to numerics,

We also have set CONVERT(YES) attribute of sender channel,

Can any one please suggest what could be the Problem

thanks in advance


Madhoo
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 10, 2007 2:51 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

It's typically better practice to do a get with convert rather than set the sender channel, but that's unlikely to be your problem.

Ensure you're sending text message (MQFMT_STRING's JMS equivalent) and there are the correct conversion tables installed in the OS (99% likely but worth a quick check).

If that doesn't help, post some examples of failed conversion.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
madhoo
PostPosted: Wed Oct 10, 2007 3:07 am Post subject: Reply with quote

Newbie

Joined: 27 Oct 2006
Posts: 8

Hi Victor

thanks for your reply

we are sending the following message
SX616 0100001775 XNB55500012632006051320071008

receives at Remote side as follows

38616000001000017750000008E255500012632006051320071008
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Oct 10, 2007 5:56 am Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Make sure the message's MQMD.CCSID value matches the message data's codepage correctly.

If you are placing Unicode (eg UTF-8) data in the message, you must set the MQMD.CCSID to 1208 before the MQPUT.

Allowing the CCSID to default to the 819 (ASCII) will confuse the data conversion.

Alternatively place ASCII data in the message to match the CCSID.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 10, 2007 2:27 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

madhoo wrote:
Hi Victor

thanks for your reply

we are sending the following message
SX616 0100001775 XNB55500012632006051320071008

receives at Remote side as follows

38616000001000017750000008E255500012632006051320071008


I suppose you are sending a javax.jms.TextMessage...
You can alternatively set the mainframe CCSID on the Destination using JNDI. You should not have the channel translate any of the messages... Use a get with convert on the mainframe.

Of course you've set up your destination to be of type MQ (or in uri form myqueueuri="queue://MYQMGR/MYQUEUE?targetClient=1"; )

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
madhoo
PostPosted: Thu Oct 11, 2007 9:03 pm Post subject: Reply with quote

Newbie

Joined: 27 Oct 2006
Posts: 8

Hi Saper,

thanks for your reply

yes iam sennding javax.jms.TextMessage now when i send this JMS message at mainframe side queue it received with some junk characters
RFH....¢...4MQSTR...?½...?._ÄÀ?(ËÀ?¦_Ë^ÈÁÌÈ..(ËÀ?_ÄÀ???.À¦_Ë?àËÈ?ÉÍÁÍÁ?.èåè^é(ñâ(åà(ë ñìáå<ääëñà??è_Ë????????????è_Ë?à%Î?à%Î?¦è_Ë????????????è_Ë?à%Î?à%Î?¦_Ë??_Ë?àËÈ?
then followed by data iam not understanding what this junk is, can you please let me know what could be the problem

Thanks
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Oct 11, 2007 11:23 pm Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

The MQMD.Format is not MQSTR.

Examine the message on AIX first. Only when you have the MQMD.Format = MQSTR, the MQMD.CCSID correctly matching the data codepage can you expect conversion to work.

You want to set the message to non-JMS (or whatever the exact Java terminology is) to get rid of the RFH header.

Queue jmsQueue = ....
com.ibm.mq.jms.MQQueue q = (com.ibm.mq.jms.MQQueue) jmsQueue ;
q.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ) ;

Quote:
The JMS messages are translated or transformed into MQSeries messages in two ways:

 Mapping
Mapping involves translating the JMS message header and message
properties to the equivalent MQMD values for which there are equivalent
MQMD fields.

 Copying
In cases where the JMS message header and message property values do
not have an equivalent MQMD field, the JMS header field or property is
passed, possibly transformed as a field in the MQRFH2 header.

The inclusion of the MQRFH2 header is optional. In an outgoing message, its inclusion is determined by a flag in the JMS Destination class. The flag can be set when defining the JMD administered objects using the JMSAdmin tool. The administrator can indicate that the JMS client is communicating with a non-JMS client by setting the MQSeries Destination’s TargetClient value to
JMSC.MQJMS_CLIENT_NONJMS_MQ.

Since the MQRFH2 header carries JMS-specific information, you should include it when the sender knows that the
receiving client is a JMS client. If the receiver is not a JMS client, omit the MQRFH2 header.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Oct 12, 2007 8:27 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

madhoo wrote:
Hi Saper,

thanks for your reply

yes iam sennding javax.jms.TextMessage now when i send this JMS message at mainframe side queue it received with some junk characters
RFH....¢...4MQSTR...?½...?._ÄÀ?(ËÀ?¦_Ë^ÈÁÌÈ..(ËÀ?_ÄÀ???.À¦_Ë?àËÈ?ÉÍÁÍÁ?.èåè^é(ñâ(åà(ë ñìáå<ääëñà??è_Ë????????????è_Ë?à%Î?à%Î?¦è_Ë????????????è_Ë?à%Î?à%Î?¦_Ë??_Ë?àËÈ?
then followed by data iam not understanding what this junk is, can you please let me know what could be the problem

Thanks

fjb_saper wrote:
Of course you've set up your destination to be of type MQ (or in uri form myqueueuri="queue://MYQMGR/MYQUEUE?targetClient=1"; )


Did you implement the second part about the clientTarget ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMScoonversion of Message
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.