|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
TDS Message SET |
« View previous topic :: View next topic » |
Author |
Message
|
dipankar |
Posted: Thu Mar 31, 2005 10:46 pm Post subject: TDS Message SET |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
Hi,
I have created a message set where data types of all fields are string using delimiter ',' and repeating element delimiter <CR><LF> and this is my input data
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07
It is working fine.
Now for creating exception I give the following input
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07,ABCD
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07
Look at the first row, I have added an extra element 'ABCD' which is not in message set.
But it creats no exception, Last element of Message set is assigned to '43.07,ABCD'
How can I resolve it? Please help me. |
|
Back to top |
|
 |
Ramphart |
Posted: Mon Apr 04, 2005 5:34 am Post subject: Re: TDS Message SET |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
dipankar wrote: |
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07,ABCD
02114,UKMSL,290904,145030,50.61,7734545154,02September,7.54,63,7020,43.07
'43.07,ABCD'
|
In this particular case you can define your last field in your message set as decimal. I'm guessing that you have defined it as string at the moment and thats why you don't get an error when it encounters the value '43.07,ABCD'. _________________ Applications Architect |
|
Back to top |
|
 |
dipankar |
Posted: Mon Apr 04, 2005 8:38 pm Post subject: TDS Message Set |
|
|
Disciple
Joined: 03 Feb 2005 Posts: 171
|
But if the type of the last element in message set is string then what should I do? How can I create exception? |
|
Back to top |
|
 |
Ramphart |
Posted: Mon Apr 04, 2005 11:00 pm Post subject: Re: TDS Message Set |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
dipankar wrote: |
But if the type of the last element in message set is string then what should I do? How can I create exception? |
You can add a value contraint of type pattern to your last element and your pattern should fail when a comma (,) is encountered. _________________ Applications Architect |
|
Back to top |
|
 |
shanson |
Posted: Mon Apr 11, 2005 3:49 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Fyi - when the MRM TDS parser reaches the last element in an All Elements Delimited group, it assumes that everything encountered until the next significant piece of markup is data. That's why ABCD gets added to the end of the last field value. It is questionable that this is what the majority of users would want, but it is historical behaviour and for compatibility reasons we could not change this without a new TDS option. |
|
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
|
|
|
|