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 » MRM message parsing

Post new topic  Reply to topic
 MRM message parsing « View previous topic :: View next topic » 
Author Message
vadivel
PostPosted: Mon Mar 22, 2004 4:59 pm    Post subject: MRM message parsing Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

Hi,

I have a fixed length message with the following structure.

<LineNumber><DataCode><RecordIdentifier><Data fields....>

The record Identifier identifies the type of record.

In one file I can have 4 different types of records which are uniquely identified by the record identifier field, but the fields preceding them are always of fixed legth.

How do you parse this kind of a message using MRM parser.

Thanks & Regards

Vels
Back to top
View user's profile Send private message Yahoo Messenger
Missam
PostPosted: Mon Mar 22, 2004 6:34 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

you need to construct a TDS message to parse your data.
can you post some of your sample data here.how is your line numbers actually represent in your data.is it also a fixed length.
Back to top
View user's profile Send private message
vadivel
PostPosted: Tue Mar 23, 2004 12:12 am    Post subject: Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

Ya the line number is also fixed length.

The sample data is something like this:

00000010101abcd0123456789efg
00000020102adfasdfkkdhkjeidfdk
00000030102dadafkllasdsdafhfds
00000040102dssafjeiursdafkncdk
00000050109dasgfkjasdglkasdffg

Here the first 7 digit is line number, following 3 digit is data code and the next digit is the record identifier (1-Header, 2-Detail, 9-Trailer). The data following are some other fields.
I want to identify the record based on the record identifier and parse the following fields accordingly.

Please let me know if you need any other input.

Thanks & Regards

Vadivel S.
Back to top
View user's profile Send private message Yahoo Messenger
fjcarretero
PostPosted: Tue Mar 23, 2004 1:58 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Hi,

If Header, Detail & Trailer have different lengths, you will need multipart messages.

Cheers
Felipe
Back to top
View user's profile Send private message
vadivel
PostPosted: Tue Mar 23, 2004 2:11 am    Post subject: Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

No they are of the same length.
But the fields in them vary.

Regards

Vels
Back to top
View user's profile Send private message Yahoo Messenger
fjcarretero
PostPosted: Tue Mar 23, 2004 2:32 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Hi,

Then you can use a choice or multipart messages.

Basically, you have to create a type and in the composition label choose 'choice' or 'message' (depending on choice or multipart).

The broker parses the message until it finds the field corresponding to the type that you have defined as choice/message. Then in the ESQL you have to decide the what type of message is coming (reading the record identifier field). When you reference the first field after the record identifier field of the specific type (ie Header, Detail or Trailer), the broker will parse the rest of the message.

Hope this helps
Felipe
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Mar 23, 2004 4:36 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjcarretero wrote:
If Header, Detail & Trailer have different lengths, you will need multipart messages.

I don't think that's true if you're using TDS modelling. The stuff before the Tag has to be the same length, but everything after the tag up to the group delimiter can be different lengths.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjcarretero
PostPosted: Tue Mar 23, 2004 5:25 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

You are right!.

I was only thinking about CWF.

Cheers
Felipe
Back to top
View user's profile Send private message
Missam
PostPosted: Tue Mar 23, 2004 6:53 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Quote:
I was only thinking about CWF

You can't do it using CWF.use need to go with TDS only.

HI vadivel

you better have a look on this link.its almost same as your requirement.
http://www.mqseries.net/phpBB2/viewtopic.php?t=14071&highlight=

First parse the entire message using TDS and in a compute node you can identify the field record identifier and based on that you can play your ESQL code.
Back to top
View user's profile Send private message
fjcarretero
PostPosted: Tue Mar 23, 2004 7:02 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Quote:
You can't do it using CWF.use need to go with TDS only


Believe me, you can.
Back to top
View user's profile Send private message
Missam
PostPosted: Tue Mar 23, 2004 8:08 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Quote:
Believe me, you can

i believe if you have a message with data in multiple line(delimter of each line <CR><LF>.we should go with TDS rather than CWF.
if you still believe you can do it using CWF.can you provide us a working example
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 25, 2004 5:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Just to clear up this point:

If you use TDS, you can get the entire message parsed automatically. (The record identifier is modelled as either a tag or a group indicator, and the TDS parser uses it to automatically resolve the choice)

If you use CWF, you can still process the message, but your ESQL has to interpret the record identifier and resolve the choice. CWF cannot *automatically* resolve choices, because it does not have the concept of 'tags'.
Back to top
View user's profile Send private message
Missam
PostPosted: Thu Mar 25, 2004 7:06 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi kimbert,
If you look into Working With Messages manual.You can get a clear picture what you can do with CWF and TDS.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 25, 2004 9:08 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sam : What I posted is correct. Why do you think the WWM manual would help?
Back to top
View user's profile Send private message
vadivel
PostPosted: Tue Mar 30, 2004 12:15 am    Post subject: Reply with quote

Voyager

Joined: 05 Aug 2002
Posts: 79
Location: US

hi all,

Thanks for all the suggestions and tips..
I was able to parse the message using TDS.

Thanks & Regards

Vadivel S.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MRM message parsing
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.