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 Index » General IBM MQ Support » .NET - Queue Message Length gets doubled

Post new topic  Reply to topic
 .NET - Queue Message Length gets doubled « View previous topic :: View next topic » 
Author Message
Prem
PostPosted: Wed Jul 28, 2010 1:42 am    Post subject: .NET - Queue Message Length gets doubled Reply with quote

Newbie

Joined: 06 Jul 2010
Posts: 3
Location: India

Below is the code I use to put messages on the queue:

queue = queueManager.AccessQueue(QueueName,
MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
message = strInputMsg;
queueMessage = new MQMessage();

queueMessage.WriteString(strInputMsg);

queueMessage.Format = MQC.MQFMT_STRING;
queuePutMessageOptions = new MQPutMessageOptions();
queue.Put(queueMessage, queuePutMessageOptions);

This code works fine and puts the messages on the queue, but somehow the message length becomes double. When I see this message on the Mainframe screen the message is dispalyed, but after the complete message there are (.) dots. So I guess all these dots and my original message sums up to become double the original message length.

When I put a Messagebox to check the message length after the stathement "queueMessage.WriteString(strInputMsg);". That is the place where the lenght becomes double.

Any idea what could be the cause?
_________________
Regards,
Parag Dhande
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jul 28, 2010 4:06 am    Post subject: Re: .NET - Queue Message Length gets doubled Reply with quote

Grand High Poobah

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

Prem wrote:
Any idea what could be the cause?


You need to search the forum for previous discussions on string handling within .NET with particular reference to where & when it uses single or double byte character sets. You're not the first to travel this path.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » .NET - Queue Message Length gets doubled
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.