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 / JMSJunk chars while retrieving the msg from the Q

Post new topicReply to topic
Junk chars while retrieving the msg from the Q View previous topic :: View next topic
Author Message
mitul
PostPosted: Thu Dec 09, 2004 5:43 am Post subject: Junk chars while retrieving the msg from the Q Reply with quote

Apprentice

Joined: 13 Jun 2002
Posts: 33

We have a client application that remotely puts messages on our QManager on a Unix Box. The client environment is Windows NT.

The client is putting the msg in RUSSIAN language (cyrillic) and when i am trying to retrieve the messgs on Unix box it shows all chars as shown -
"? ? ? ? ? "

I am not setting the MQGMO_CONVERT option while getting the msg, cause I am not sure whether the client is setting the MQFORMAT to MQSTR.

Also i think they are not using writeUTF, cause of which we have to get the msg in readString format.

Also we are using a java program to get the msgs. And the Q expects the normal string messages(en us) as well (which work fine)

Pls suggest something.

Regards,
Mitul
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Dec 09, 2004 6:11 am Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'd suggest that you run the amqsbcg sample against the message on your queue. You can then look at the MQMD to see what is and isn't set in the way of message format and code page. It might shed some light on what's going on.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mitul
PostPosted: Thu Dec 09, 2004 11:03 pm Post subject: Reply with quote

Apprentice

Joined: 13 Jun 2002
Posts: 33

This is what i get...

****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1251
Format : ' '
Priority : 0 Persistence : 1
MsgId : X'414D51204345454D45415F5243535F47DDE6B64120002D01'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : 'CEEMEA.RCSGI.BANGLADESH.LISTEN '
ReplyToQMgr : 'CEEMEA_RCS_GI_QM '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '11'
PutApplName : 'leaseUMinDep\Validator.exe'
PutDate : '20041210' PutTime : '05134506'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 100 bytes

00000000: 3030 3030 3030 3030 3030 3030 3030 3030 '0000000000000000'
00000010: 3030 3030 3030 3030 3030 3233 3734 3230 '0000000000237420'
00000020: 464C 4558 4355 4245 2020 2020 2020 2030 'TESTDATA 0'
00000030: 3052 4547 E2E2 80E2 80C5 809A 20E2 E280 '0REG........ ...'
00000040: E280 E280 98E2 E280 9EC2 C2CB C5C5 E280 '................'
00000050: E2E2 80E2 809A CBE2 8094 2A07 E2E2 80E2 '..........*.....'
00000060: 80C5 809A '.... '


Q.1. Do I need to keep track of CodedCharacterSet and Encoding values and act accordingly..?? If yes then how do I do this using Java.
Q.2. Also let me know whether we can make this generic.. for any language.. ?
Q.3. Will this work if the client is writing the data using writeString..? Do I need to get the msg as readUTF or readString. Currently I am using readString cause the client is using writeString..?

Pls respond.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 09, 2004 11:26 pm Post subject: Reply with quote

Grand High Poobah

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

Supposing your message format is MQSTR:

1) Translation only happens from one char set to the other. This has nothing to do with language translation(russian to english).
2) I do not know what the cyrillic ccsid is. But if the mapping from cyrillic to your ccsid gives you non displayable data you will have funny chars.

Enjoy
Back to top
View user's profile Send private message Send e-mail
mitul
PostPosted: Fri Dec 10, 2004 12:39 am Post subject: Reply with quote

Apprentice

Joined: 13 Jun 2002
Posts: 33

Thanks.
But the client application is not setting any Message Format.
All they are doing is, setting the CodedCharSetId explicitly to 1251.

Pls help as to what should I do to get the message in the desired format.
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri Dec 10, 2004 4:37 am Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

If the data is character data, then the client should set the format to 'MQSTR ' so that WMQ knows the message format and can do the conversion.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
mitul
PostPosted: Fri Dec 10, 2004 5:05 am Post subject: Reply with quote

Apprentice

Joined: 13 Jun 2002
Posts: 33

Will them doing a writeUTF and we doing a readUTF at our end work..?

The string that we are dealing with contains special chars...
ââ€â€Å€š ââ€â€â€˜â„ÂÂËÅÅâ€ââ€â€šË—*

Pls advise.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 10, 2004 5:24 am Post subject: Reply with quote

Grand High Poobah

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

I seriously doubt it. Write UTF I believes puts it in UTF8.
You would probably need something like UTF16.
Don't know if but suspect that Cyrillic ccsid might have double byte chars...
If it is a single byte char it might solve part of your issue.

Any way you need to enable and support translation from cyrillic ccsid to your own. Check out manuals.

Enjoy
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 / JMSJunk chars while retrieving the msg from the Q
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.