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 » how to model message set for tds mrm message

Post new topic  Reply to topic
 how to model message set for tds mrm message « View previous topic :: View next topic » 
Author Message
PRKUMAR
PostPosted: Thu Sep 13, 2012 8:40 pm    Post subject: how to model message set for tds mrm message Reply with quote

Apprentice

Joined: 04 Sep 2012
Posts: 36

Hello,
Please guide me how to model TDS MRM message set. Each message have different fixed length.
Back to top
View user's profile Send private message
PRKUMAR
PostPosted: Thu Sep 13, 2012 8:51 pm    Post subject: input message structure Reply with quote

Apprentice

Joined: 04 Sep 2012
Posts: 36

the input message structure would be anyone of below records:
102;abc;desc1;500000;28
103;def;532235
104;ijk;25;42

I would like to parse the message based on the second field(abc,def,ijk). If second field is abc, i would like go with first record model, if second field of the record is ijk then i would like to another model.
How to model records that have different fixed lengths, and all records are actually fixed in length.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Thu Sep 13, 2012 9:01 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you looked at the Sample Flows? There is a csv example there.

I'd parse the whole lot and then look at the elements and make your decision. Naturally this can't be done in the parser (or can it with the DFSL one?) and will require some ESQL (or Java if that is your thing).
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Sep 14, 2012 4:36 am    Post subject: Re: input message structure Reply with quote

Grand High Poobah

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

PRKUMAR wrote:
I would like to parse the message based on the second field(abc,def,ijk). If second field is abc, i would like go with first record model, if second field of the record is ijk then i would like to another model.


So you're using the second field as a tag? That's fairly clearly documented.

PRKUMAR wrote:
How to model records that have different fixed lengths, and all records are actually fixed in length.


Well clearly you identify them as you discuss above. Also I'm unclear why you're obsessed with fixed length. It may well be the case that if the 2nd field is 'abc', the next field is 4 characters long, the next 6 & the last 2. But what you've posted shows them delimited by semi-colons. So if you have a field which is always 4 characters long and is always terminated by a semi-colon, is it fixed length or is it delimited?

You can model both of course. It's a question of which better fits your needs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Sep 14, 2012 5:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What do you know about the order of the records?

Is there reason to expect that all abc records will come first, and then all the def records and then all the ijkl records?

Or is there reason to expect that any type of record can occur in any order?

As Vitor says, it's fairly clearly documented how to assign a tag to an element that is an instance of a complex type.

Once you have your types defined, you need to decide how to model the larger structure and repeating structure of the message. Which records repeat and in what order? Then you can construct further complex types to indicate that structure, and you can choose to use the tags to resolve choices or not.
Back to top
View user's profile Send private message
PRKUMAR
PostPosted: Sun Sep 16, 2012 8:59 pm    Post subject: there is no order for messgaes Reply with quote

Apprentice

Joined: 04 Sep 2012
Posts: 36

There is no order of the records defined.
Each message will contain only one single record. The messages of a particular type can come in any order.
I am designing the flow in such a way that, the mqinput nodes parses the input messages in a blob format. After which, in compute node i am validating the second field of the message and accordingly i am setting the properties for message set, message format and message type.
So for each condition(based on the value my second field in the record) i am setting all these three properties.
They are 15 different values for the second field. So I am setting message set, message format and message type for 15 times based upon the values. Is the correct way of doing it?
Do I have any other options for better processing of the messages?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Sep 17, 2012 12:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Create a local sequence and a local chocie within the outermost complex type.
The first sequence will contain only one element ( the first element )
The local choice group will contain all of the types of record, but the second field ( the tag ) will not be included as an element. That is a tag. So you need to set Data Element Separation to 'Tagged Delimited' on the choice group, and set the Tag Data Separator to ';'.
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 » how to model message set for tds mrm 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.