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 » IBM MQ API Support » MQ WriteString in mutibytes

Post new topic  Reply to topic
 MQ WriteString in mutibytes « View previous topic :: View next topic » 
Author Message
kyl
PostPosted: Wed Feb 25, 2004 10:50 am    Post subject: MQ WriteString in mutibytes Reply with quote

Newbie

Joined: 25 Feb 2004
Posts: 8

Hi

Is there an option can be set in .NET MQMessage WriteString()
write a regular string "1234567890" , length 10 bytes, in single bytes
instead of unicode like this "1\02\03\04\05\06\07\08\09\00\0"
length 20 bytes.

Thanks
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Feb 25, 2004 11:12 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

There are mny methods to write a message.

These are a few of the many

Code:

public void Write(byte[] b, int off, int len)

 public void WriteBytes(String s)

 public void WriteString(String str)


You should look at the Using .NET manual chapter 5 for the classes and interfaces.

Using .NET Manual
Back to top
View user's profile Send private message Send e-mail Visit poster's website
brad_blackmon
PostPosted: Thu Mar 04, 2004 7:28 pm    Post subject: Reply with quote

Newbie

Joined: 04 Mar 2004
Posts: 4
Location: Washington, D.C.

Also, look at setting the MQMessage.CharacterSet property before you call the WriteString() method. If you do nothing, it seems to default to 1200, which writes the string to the queue in unicode. However, if you set the CharacterSet property to 437 before you call the WriteString() method, it will write the string to the queue in ASCII text.

Cheers!

--Brad
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQ WriteString in mutibytes
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.