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 » TDS misunderstanding

Post new topic  Reply to topic
 TDS misunderstanding « View previous topic :: View next topic » 
Author Message
Shahid.Hussain
PostPosted: Wed Mar 18, 2009 7:39 am    Post subject: TDS misunderstanding Reply with quote

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
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Mar 18, 2009 7:43 am    Post subject: Re: TDS misunderstanding Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Wed Mar 18, 2009 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Shahid.Hussain
PostPosted: Sat Mar 21, 2009 2:47 am    Post subject: its working.. Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

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