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 - CSV Design Question

Post new topic  Reply to topic
 TDS - CSV Design Question « View previous topic :: View next topic » 
Author Message
vk
PostPosted: Tue Dec 05, 2006 2:26 pm    Post subject: TDS - CSV Design Question Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

I have an interface where input message is TDS-Fixed With and output is TDS-CSV. Output message has a lot of String fields and the requirement is to enclose all of them in double quotes. But numeric fields should be left as such. I tried the following options to achive this -

1. Manually append double quotes before and after the field value in ESQL. This works fine.

2. Define a wrapper type for each String element. The properties of the type are Data Element Separation = All Elements Delimited, Group Indicator = ", Group Terminator = ". This also works fine.

But I dont think this is a good design if the number of String elements in the message is more. Is there anyway to make the MRM parser automatically add double quotes to all String elements?

If all fields in the message are Strings, then we can define the type as Data Element Separation = (All Elements Delimited), Delimiter = (","), Group Indicator = (") and Group Terminator = ("). But this cannot be used when there are numeric fields in the message.

Thanks in advance,
VK.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 05, 2006 2:27 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There is a CSV sample in the Samples gallery.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vk
PostPosted: Tue Dec 05, 2006 8:34 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

Thanks Jeff.

I went through the message set sample available in the samples gallery. Two design options given there are same as the ones I mentioned in my initial post. The thrid one expects the double quotes to be present in the input message, which will not be the case for me.

For now, I will go with the options 1 or 2 which I already tried out. I will also think of some other easier way for achieving the same. Please let me know if you can think of any other option.

Thanks,
VK.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Dec 06, 2006 3:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi vk,

Option 2 is the best option in v6.0. However, you are correct to point out that this is rather cumbersome. It would be ideal if you could define a String type which had a Group Indicator and Group Terminator. Unfortunately, GI/GT only apply to complex types and groups.
However...you could try this if you're feeling brave:
- Define a new complex type 'QuotedString'
- Set its 'Base Type' property to 'xs:string'.
- Set its Group Indicator and Group Terminator to "
- Change all uses of xs:string to QuotedString.

I have not tested this, but in theory it ought to work.
Back to top
View user's profile Send private message
vk
PostPosted: Thu Dec 07, 2006 4:41 pm    Post subject: Reply with quote

Partisan

Joined: 20 Sep 2005
Posts: 302
Location: Houston

Thanks kimbert. This works. I tried in WMQI 2.1 and WMB v6.0. it is working in both.

Regards,
VK.
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 » TDS - CSV Design Question
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.