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 Java / JMS » MANY ways of writing strings to a Queue-CONFUSED

Post new topic  Reply to topic
 MANY ways of writing strings to a Queue-CONFUSED « View previous topic :: View next topic » 
Author Message
yaravind
PostPosted: Fri Oct 18, 2002 11:24 am    Post subject: MANY ways of writing strings to a Queue-CONFUSED Reply with quote

Apprentice

Joined: 17 Jun 2002
Posts: 25

I want to store a java String in the MQMessage class. For this I see that there are many ways to do

writeBytes(String s)
writeChars(String s)
writeString(String s)
writeUTF(String s)

I am confused which one to use. Can u pls let me know the differences among these four and which one do u recommend.

The string message i put on a queue is being processed by a mainframe CICS transaction

Thanks in advance
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
boaz
PostPosted: Sun Oct 20, 2002 3:56 am    Post subject: Re Reply with quote

Apprentice

Joined: 28 May 2002
Posts: 43

I think it is easier to use a JMS TextMessage so you simply use
the
Code:
setText(java.lang.String string)
Back to top
View user's profile Send private message Send e-mail
yaravind
PostPosted: Sun Oct 20, 2002 6:04 am    Post subject: Reply with quote

Apprentice

Joined: 17 Jun 2002
Posts: 25

I am using only IBM Base java API
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
RogerLacroix
PostPosted: Sun Oct 20, 2002 8:22 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

I find writeString() works just fine when sending messages to the mainframe. Just make sure you set MQMessage format to MQC.MQFMT_STRING.

later
Roger...
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
harwinderr
PostPosted: Thu Nov 14, 2002 8:27 pm    Post subject: Reply with quote

Voyager

Joined: 29 Jan 2002
Posts: 90

Actually the method writeString() writes a string , converting it to the codeset identified by the characterSet member variable.
The default value of the characterSet variable is MQC.MQCCSI_Q_MGR, which specifies that the character data in the application message data is in the queue manager's character set.
Additional character set values are supported like
850 - commonly used ASCII codeset
819 - the ISO ASCII
1208 - UTF.

But the writeUTF() method writes the string in the UTF format only.
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 Java / JMS » MANY ways of writing strings to a Queue-CONFUSED
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.