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/TDS modelling issue

Post new topic  Reply to topic
 MRM/TDS modelling issue « View previous topic :: View next topic » 
Author Message
shalabh1976
PostPosted: Fri May 27, 2005 3:09 am    Post subject: MRM/TDS modelling issue Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Here is my sample data:

C;000002;2005-MAY-17;2005-APR-17;SONY;SONY;JKL;1;000001;2;www.sony.com;CNAE;001;;;VGOMEZ;NIF;A;JKL;FGM;;;A;ESP;;1500;2005-MAY-17;20;DFLT;Y
A;000002;1;MAIN ADDRESS;2005-MAY-17;00189;CORSEGA 372;plazos de pago y cuenta;;;BARCELONA;CL;BARCELONA;08008;VGOMEZ
V;000002;1;2005-MAY-18;ESP;;VAT_APPLICABLE;T
V;000002;1;2005-MAY-18;ESP;;VAT_DCLRTN_PT_GDS;I
V;000002;1;2005-MAY-18;ESP;;VAT_DCLRTN_PT_SVC;I
V;000002;1;2005-MAY-18;ESP;TGS;TAX_CD_VAT;IV_STD
V;000002;1;2005-MAY-18;ESP;TSS;TAX_CD_VAT;IV_STD
A;000002;2;LOCAL ADDRESS;2005-MAY-17;00189;DIAGONAL 10;plazos de pago y cuenta;;;BARCELONA;CL;BARCELONA;08021;VGOMEZ
V;000002;2;2005-MAY-18;ESP;;VAT_APPLICABLE;T
V;000002;2;2005-MAY-18;ESP;;VAT_DCLRTN_PT_GDS;I
V;000002;2;2005-MAY-18;ESP;;VAT_DCLRTN_PT_SVC;I
V;000002;2;2005-MAY-18;ESP;TGS;TAX_CD_VAT;IV_STD
V;000002;2;2005-MAY-18;ESP;TSS;TAX_CD_VAT;IV_STD
C;000001;2005-MAY-17;2005-APR-17;FORD;FORD;JKL;1;000001;2;www.ford.com;CNAE;;;;OMN;NIF;A;JKL;FGM;;;A;ESP;;1500;2005-MAY-17;20;DFLT;Y
A;000001;1;MAIN ADD CUST 1;2005-MAY-19;00187;SARRIA 51;plazos de pago y cuenta;;;BARCELONA;CL;BARCELONA;08040;VGOMEZ
V;000001;1;2005-MAY-18;ESP;;VAT_APPLICABLE;T
V;000001;1;2005-MAY-18;ESP;;VAT_DCLRTN_PT_GDS;I
V;000001;1;2005-MAY-18;ESP;;VAT_DCLRTN_PT_SVC;I
V;000001;1;2005-MAY-18;ESP;TGS;TAX_CD_VAT;IG_STD

There will always be a Customer line, followed by an address line (if the address is new or has changed) and then VAT files related to the customer and address. Customer and VAT lines are optional and can repeat any number of times for a customer.

I was unable to use a MRM because each line format is dependant on the value in the first field ie C,V or A.

What I tried to do was to read in the message as a TDS where each line is delimited by CRLF. Now I substring for 1 from 1 to get the value of the first column and populate three arrays( 1 each for customer, address and Vat). Now I propagate the message and map the arrays to separate MRM's
and it works fine till here. Going ahead I think that I will need to aggregate the output and then do some manipulation to convert the message to XML.

I think it would have been better if the input could somehow have been mapped in the input itself rather than following this round about way.
Any suggestions to create a proper MRM that can read this message directly would be highly welcome.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Fri May 27, 2005 3:15 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is straight forward Tagged, Delimited mapping.

C, A, and V are your tags. Based on your requirements, you should structure your model like this
Code:
Msg
   Group (0...*)
      C Record (1)
      A Record (0..1)
      V Record (0..*)


It seems like you need to use Variable length elements delmited as your data element separation.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri May 27, 2005 4:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Jeff is correct - the MRM TDS parser should be able to do all the parsing for you. I don't think you need Variable Length Elements Delimited, because all of your fields are terminated by a delimiter (;) - I think All Elements Delimited will do just fine. I may have missed something, though.
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 » MRM/TDS modelling issue
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.