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 » Problem with TDS message set

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 Problem with TDS message set « View previous topic :: View next topic » 
Author Message
Broker
PostPosted: Mon Mar 19, 2012 12:32 pm    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

Thats where is the whole problem.

If i use it as tagged delimited with outer element length of tag specified as 1,and inner length as 2, I am unable to count the number of occurances of body? I am trying it with select statement but I wanted to know if there is a way to do that directly in a message set than doing in code.

I wrote the data pattern as specified above but does not make any difference?
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Mar 20, 2012 12:08 am    Post subject: Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Does your parsing work (properly?!)? You also have a good feeling down the line (e.g. all the possible msgs that will go through your flow in production)?!

It actually happened to me that the msg-parsing would result in a sub-optimal msg-structure, so that I had to put in some pre-processing code (about 30 to 40 lines), just to get a proper structure/nesting.

You are showing a (very) good understanding of reg-exps
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Mar 20, 2012 3:02 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I must be slacking. We're on the third page of a TDS question before I get to comment.

Broker has actually described the problem quite well. It's not trivial to do this in TDS. Data patterns could do it, but I think there's a better way that will also use less CPU ( see Vitor's comment ).

Code:

element name='Message'
    complexType DataElementSeparation='TaggedDelimited' TagLength=0 Delimiter='<CR><LF>'
        sequence DataElementSeparation='TaggedDelimited' TagLength=1 Delimiter='<CR><LF>'
            element name='Header1' Tag='8'
            element name='Header2' Tag='5'
        choice DataElementSeparation='TaggedDelimited' TagLength=3 Delimiter='<LF>' minOccurs='0' maxOccurs='unbounded'
            element name='Body627' Tag='627'
            element name='Body637' Tag='637'
        sequence DataElementSeparation='TaggedDelimited' TagLength=1 Delimiter='<CR><LF>'
            element name='Trailer8' Tag='8'
            element name='Trailer9' Tag='9'
            element name='Trailer9' Tag='9'
                complexType GroupIndicator='99' ...


Don't assume that this will 'just work'. I have not tested it at all. If it doesn't work first time then take a debug-level user trace and see what the TDS parser is actually doing.

Note the following:
- you can use a sequence or choice group to change the length of tag mid-way through a structure
- you can use a group indicator to consume the extra two 9s in the last trailer, rather than changing the tag length ( again ).
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Mar 20, 2012 3:03 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

oh, and I almost forgot...

It would be much easier if you were using the new DFDL parser in WMB v8
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Mar 20, 2012 4:36 am    Post subject: Reply with quote

Grand High Poobah

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

kimbert wrote:
I must be slacking. We're on the third page of a TDS question before I get to comment.


I assumed you were on holiday....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Mar 20, 2012 5:20 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

And MRM does not ever allow you to construct a model that will count elements of a certain type and assign the results to a field in the model.

You must always count the elements yourself and assign the field yourself.
Back to top
View user's profile Send private message
Broker
PostPosted: Tue Mar 20, 2012 11:39 am    Post subject: Reply with quote

Novice

Joined: 19 Mar 2012
Posts: 22

Thanks a Lot everyone. I did the same way as kimbert said using sequences and group Indicators and that worked.

Thanks a lot again
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with TDS message set
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.