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 » Parsing User Defined Text with variable tag delimitor

Post new topic  Reply to topic
 Parsing User Defined Text with variable tag delimitor « View previous topic :: View next topic » 
Author Message
jborella
PostPosted: Tue Apr 13, 2010 4:50 am    Post subject: Parsing User Defined Text with variable tag delimitor Reply with quote

Apprentice

Joined: 04 Jun 2009
Posts: 26

Suppose You have a message where the first letter in the message is the tag delimiter to use, when parsing a CSV-like text (I say like, because CSV always uses ',' as the delimiter).

For instance

|abc|def

Would specify '|' as delimiter, and thus this line would be a message with two elements 'abc' and 'def'.

My problem is, that I can't see any way to change the delimiter at runtime. I've tried different things with no luck. Nearest shot was to define the Messaging standard as HL7 and interpret the first element as 'HL7 Field Separator', but it couldn't parse dynamically, only write. Furthermore I'm under the impression, that HL7 is a specific format for healthcare, so I might run into restrictions later. I would prefer to use 'User Defined Text' as the messaging standard.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Apr 13, 2010 5:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

MRM can't handle dynamically determined delimiters.

This is for example why MIME is a separate domain.

If you need to process this file, and do not feel up to writing your own custom parser, you can use ESQL or Java to manipulate the message data when read as BLOB to extract the first character, and then REPLACE all occurences of it with a known, fixed character.

That is, turn all instances of "|" into "," and then use the CSV samples.
Back to top
View user's profile Send private message
jborella
PostPosted: Tue Apr 13, 2010 5:56 am    Post subject: Reply with quote

Apprentice

Joined: 04 Jun 2009
Posts: 26

Okay. Thanks for the answer. Then I know at least which way to work.
Back to top
View user's profile Send private message
maesbrae
PostPosted: Tue Apr 13, 2010 5:56 am    Post subject: Reply with quote

Novice

Joined: 03 Jun 2003
Posts: 12

Or just use ESQL to split the record up with Substring using the first character as the delimiter
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 » Parsing User Defined Text with variable tag delimitor
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.