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 » WebSphere Message Broker (ACE) Support » Setting up a Message set for parsing a simple text message

Post new topic  Reply to topic
 Setting up a Message set for parsing a simple text message « View previous topic :: View next topic » 
Author Message
jonasb
PostPosted: Mon Oct 27, 2008 1:47 am    Post subject: Setting up a Message set for parsing a simple text message Reply with quote

Apprentice

Joined: 20 Dec 2006
Posts: 49
Location: Sweden

Hi,

I get simple text messages on an MQ queue a want to parse them by line,
i.e.

msg:
this is the firstline
and this is the second

parsed (in xml syntax to make it more understandable):
<message>
<line>this is the firstline</line>
<line>and this is the second</line>
</message>

This seems like a simple enough task, yet I have struggled with it for some time now.

If someone could give me some pointers it would be greatly appreciated.

I have tried TDS with different DataElementSeparation schemas (including UseDataPatterns) but I do not get it to parse.

I guess I could use BLOB and separate manually on "[\r]\n", but I do not want to revert to that unless I need to.

Kind Regards,
_________________
contact admin
Back to top
View user's profile Send private message
hopsala
PostPosted: Tue Oct 28, 2008 3:15 am    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

This is indeed not a difficult task, and you're probably stuck on some TDS parameter you've mal-configured. One way to do what you want is to have a TDS message, that has one child called "line" which can be repeated, delimited using "All elements delimited" with linebreak (<BR><CR> if memory serves) as the delimiter.

Further help can be found in the CSV sample in the samples gallery - in the toolkit click "help" and then "samples gallery", it should be under "technology samples". Import the sample, and go over the explanation in the sample gallery; you'll find a detailed explanation under "read about the sample" and then clicking "Exploring CSV the sample"

Otherwise, post here your code and the exact contents of your message set configuration, and the exception you're getting, and we'll try to help. Be advised, though, that it will be much quicker for you to solve it on your own, aided by the CSV sample.

Keep us posted, and good luck!
Back to top
View user's profile Send private message
jonasb
PostPosted: Wed Oct 29, 2008 2:34 am    Post subject: Reply with quote

Apprentice

Joined: 20 Dec 2006
Posts: 49
Location: Sweden

Thanks for your input. I just recreated the message set from scratch again and it work the first time...
_________________
contact admin
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 » WebSphere Message Broker (ACE) Support » Setting up a Message set for parsing a simple text 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.