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 input as TDS

Post new topic  Reply to topic
 Parsing input as TDS « View previous topic :: View next topic » 
Author Message
pawel_janowski
PostPosted: Tue Nov 09, 2010 6:47 am    Post subject: Parsing input as TDS Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

Hi!
I've got the problem with parsing input messages of the following format:
    - each message consist of one or more segments and each segment starts with segment indicator of form @5000, with assigned value "#"
    and the there is a @5001 field with a value indicating a segment type
    - each segment consists of one or more fields and each field consists of field indicator of form @<xxxx>, where <xxxx> is exactly four digit number
The structure of segments is quite flat - the segment definition cannot contain any other segments.

Example:

Code:
@5000:#@5001:SEGTYPE1@5002:ABC@5005:000@1020:0101@5000:#@5001:SEGTYPE2@1232:VALUE


I'd like to parse the message as a TDS and obtain the tree-like structure consisting of a number of segments, sth like this:
Code:
<Message>
 <segment1>
  <f2>ABC</f2>
  <f5>000</f5>
  <f10>0101</f10>
 </segment1>
 <segment2>
  <f12>VALUE</f12>
 </segment2>
</Message>


I tried many combinations of tags, delimiters and so on defining MRM (wtih TDS as physical representation) and all my attepmts failed.

What is (possible the best) way to achieve the goal? Any help will be appreciated.

Pawel Janowski
_________________
Pawel Janowski
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 09, 2010 7:04 am    Post subject: Re: Parsing input as TDS Reply with quote

Grand High Poobah

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

pawel_janowski wrote:
I tried many combinations of tags, delimiters and so on defining MRM (wtih TDS as physical representation) and all my attepmts failed.


Accepting that kimbert will be along in a minute, can you post some examples for what you've tried. The description you've given seems to be a fairly straightforward TDS sort of thing & I'm interested to see where you've hit problems (and indeed what problems).

It will also prevent us suggesting obvious solutions that you've already attempted unsuccessfully.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 09, 2010 7:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Your message also seems to be covered by the tutorial at http://www.mqseries.net/phpBB2/viewtopic.php?t=47630
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 09, 2010 11:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

...a bit more than a minute. The day job got in the way.

I'll wait for some details on what pawel_janowski has tried before offering advice - no point in telling him what he knows already.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Nov 09, 2010 11:27 am    Post subject: Reply with quote

Grand High Poobah

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

kimbert wrote:
The day job got in the way.


It's a pain when that happens isn't it?
_________________
Honesty is the best policy.
Insanity is the best defence.


Last edited by Vitor on Wed Nov 10, 2010 4:57 am; edited 2 times in total
Back to top
View user's profile Send private message
pawel_janowski
PostPosted: Wed Nov 10, 2010 4:34 am    Post subject: Reply with quote

Apprentice

Joined: 13 Dec 2006
Posts: 38

OK. So my problem identification and more details as needed:

1) The problem - there is no difference between segment and field separators - they are of the same form, so parsing the segment broker cannot state that @5000 is actually an indicator of a new segment but not a new field

I tried to use @5000:#@5001:SEGTYPE1 (for the complex type defining segment of the type SEGTYPE1) and some variations of that (eg. with @ at the end).

I tried to define the global complex type with 'Use data pattern' as data element separation.

And many many - it took me two days of tests so it is not esay to describe and I think it is not worth of it, because nothing worked.

But it was always the same - the parser cannot state, when the new segment start and tries to parse a segment indicator as a field indicator.

Regards,

Pawel
_________________
Pawel Janowski
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 10, 2010 4:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Again, this appears to be tagged/fixed length messaging. No need for Data Patterns.

You say that @5000 is both a tag for a segment and a tag for a field?

You should be able to use it as a group indicator for the segment and a tag on an element inside the group.
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 input as TDS
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.