Author |
Message
|
kumar143 |
Posted: Wed Feb 02, 2011 3:22 am Post subject: let me know how to create message set |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
I had a flat file like
Header
data1
data2
data3
..
..
..
footer
I had the whole as a file.its a fixed length format. i dont know how to saggregate this file.I have to create a message set and transform it to xml format .please help me if anyone know this. |
|
Back to top |
|
 |
santnmq |
Posted: Wed Feb 02, 2011 3:32 am Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
You can refer Message Broker Red Book for the same. It has complete description on how to create message set. |
|
Back to top |
|
 |
kumar143 |
Posted: Wed Feb 02, 2011 3:40 am Post subject: |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
Thanks for your reply i know how to create message set. i wiant how to saggregate the header data and footer which is given in the notepad. |
|
Back to top |
|
 |
fatherjack |
Posted: Wed Feb 02, 2011 3:43 am Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
Can't you use the fixed length. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
kumar143 |
Posted: Wed Feb 02, 2011 4:42 am Post subject: |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
yes i used fixed length but it is taking only header it is not taking the data and the footer.i will give my sample data.
header in one line--
1HDR:05/06/10 00:09:5000 data1 in one line--
2Accenture LLP 233 N. Michigan Ave Suite 1100 Chicago IL60601 Peter Zackrison 143438 105819 24 CRITICAL ILLNESS 09/01/201071179898648840217455 05/03/201005/05/201001
data2 in one line--
2Accenture LLP 233 N. Michigan Ave Suite 1100 Chicago IL60601
Footer in one line--
3TLR: 05/06/10 10:09:5000 000000021 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 02, 2011 5:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
The "1", "2", "3" in the first position appear to indicate header, data & trailer. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kumar143 |
Posted: Wed Feb 02, 2011 5:25 am Post subject: |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
yes you are right. the what should i write the condition how should i saggregate it in the message set
I created a message set with MRM and header min occurs 1 max occurs 1
and detail min:0 and max:-1..so it runs infinite times till the loop ends and footer 0 to -1 and |
|
Back to top |
|
 |
kumar143 |
Posted: Wed Feb 02, 2011 5:27 am Post subject: |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
sorry footer min:1 and max:1 |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 02, 2011 5:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar143 wrote: |
yes you are right. the what should i write the condition how should i saggregate it in the message set |
Using the first position as a tag?
That's so obvious I've clearly misunderstood your question. On the face of it this is a fairly straighforward sort of structure so perhaps a little more detail on where you're stuck?
Also the obvious things like reviewing the TDS post in this forum, the infocenter on tagged messages and almost any post by kimbert. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kumar143 |
Posted: Wed Feb 02, 2011 6:07 am Post subject: |
|
|
Novice
Joined: 02 Feb 2011 Posts: 14
|
I am Transforming the format to XML but the header is only coming into the xml format...the remaining data is alos not coming into that. i think it is not taking second line. if you give me ur email id i will send the PI. So that if any changes needed you can inform me.so that i will work on the modifications. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Feb 02, 2011 6:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
We can't help you based on the information you've given.
We can't provide training.
There is an excellent article on using TDS to create Tagged-Fixed Length message models, which appears to match the data you have shown. You have been pointed at it. It is linked to as a "sticky" post in this forum. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Feb 02, 2011 6:17 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
A good tip to remember before you post parts of a message is to obfuscate it.
The sample you gave could very well (for all we know) contain real data. If you change the name to some (in)Famous character from history then you won't be breaking any company rules etc. Don't use any names of Superheroes from comics or Disney Characters as these are all copyrighted and you don't want to get their owners angry do we? _________________ 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 |
|
 |
Vitor |
Posted: Wed Feb 02, 2011 6:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kumar143 wrote: |
i think it is not taking second line. |
I think if you take a user trace, you'll know what it's doing. Or not doing.
kumar143 wrote: |
if you give me ur email id i will send the PI. So that if any changes needed you can inform me.so that i will work on the modifications. |
Thanks, but I already have a client engagement.
Take a user trace, determine what's actually happening. This will give you a good indication of why the non-header lines are not being identified.
I repeat my earlier advice, and additionally recommend you verify that the message definition is correct for each type. It could be that the definition for the header is actually padded to the length of the entire message (accidentally) and hence the remainder is ignored.
Just a theory, could be rubbish. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Feb 03, 2011 3:03 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
nukalas2010 |
Posted: Thu Feb 03, 2011 11:15 pm Post subject: |
|
|
 Master
Joined: 04 Oct 2010 Posts: 220 Location: Somewhere in the World....
|
kimbert wrote: |
http://mgustafson.wordpress.com/2008/12/19/modelling-tagged-fixed-length-data-in-wmb/ |
Sorry to repost it again  |
|
Back to top |
|
 |
|