|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS misunderstanding |
« View previous topic :: View next topic » |
Author |
Message
|
Shahid.Hussain |
Posted: Wed Mar 18, 2009 7:39 am Post subject: TDS misunderstanding |
|
|
Novice
Joined: 18 Mar 2009 Posts: 13
|
Hi All,
i am new on Message Broker need some help on data parsing.
i am recieving data in the following format.
ID=123456;REF=9999999;DATA=11P;CO=ABCDE;
i need these data in seperated fields.
like
for this purpose i have created a TDS message set with the following fields.
ID
REF
DATA
CO
but i am not sure about the length of any of each data, could b any lenght. but its seperated with ";". for each element what length should i put.
let say if i put length 10 for ID field its getting ID="ID=123456;" but i need only "123456" in ID field. and same for all fields.
Any help will be really appricated.
-Shahid |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 18, 2009 7:43 am Post subject: Re: TDS misunderstanding |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Shahid.Hussain wrote: |
but i am not sure about the length of any of each data, could b any lenght. but its seperated with ";". for each element what length should i put.
|
As you've built a Tagged Delimited Set, the length is (oddly enough) calculated as the distance between the tag and the delimiter.....
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Mar 18, 2009 10:54 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi,
You are not the first person to struggle with TDS initially, so here's a prod in the right direction...
Go to the TDS properties of the outermost complex type. The 'Data Element Separation' property is probably set to the default 'Fixed Length'. But your data is not fixed length - it is tagged and delimited. So you need to set that field to 'Tagged Delimited'.
Your model will look like this
Code: |
Message
complexType DataElementSeparation="Tagged Delimited", TagDataSeparator="=", Delimiter=";"
element name="identifier" Tag="ID"
element name="reference" Tag="REF"
element name="data" Tag="DATA"
element name="co" Tag="CO" |
You can and should change 'data' and 'co' to more meaningful names, so that your ESQL/mappings are more readable. |
|
Back to top |
|
 |
Shahid.Hussain |
Posted: Sat Mar 21, 2009 2:47 am Post subject: its working.. |
|
|
Novice
Joined: 18 Mar 2009 Posts: 13
|
Hi kimbert,
Thank you so much for your help, its working now.
i really appricated the way you explained.
Once again thank you so much.
Shahid Hussain. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|