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 » CSV message with data containing comma as well

Post new topic  Reply to topic
 CSV message with data containing comma as well « View previous topic :: View next topic » 
Author Message
javaforvivek
PostPosted: Mon Oct 18, 2004 10:16 pm    Post subject: CSV message with data containing comma as well Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

WBIMB5+CSD3

I am giving my sample:
FirstName,LastName,PRN,Address

'Shiva','Ganeshan','PRN-23677','B-90 Edward's Palace'

Now here, how can I mask my 'B-90 Edward'sPalace in data element 'Address', so that in the message flow it is identified correctly?
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kirani
PostPosted: Mon Oct 18, 2004 10:35 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

How did you model your input message? You can define your message to be All Elements Delimited separated by ,
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
javaforvivek
PostPosted: Mon Oct 18, 2004 10:38 pm    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

sorry,
I got it a bit wrong..
The message looks like this:
'Shiva''Ganeshan''PRN-23677''B-90 Edward's Palace'
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kimbert
PostPosted: Tue Oct 19, 2004 2:45 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Can you clarify something for me. Your subject line says 'CSV' message, which implies 'comma-separated', but in your example data, there are no commas. Are your fields really just enclosed within single quotes, with no other delimiter?
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Tue Oct 19, 2004 3:48 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

This can be either way...
I can give you another example where actual scenario occurs:
USD,GBP,1,833,10/10/2004
Where 1,833 , in fact, is exchange rate 1.833;
The message actually contains Four fields:
Base Currency - USD
Foreign Currency - GBP
Rate - 1,8333
EffctiveDate - 10/10/2004

Sorry for the total mismatch of the subject line and examples earlier (but the situation is analogous), but that scenario is true as well, where we have some customer info coming in..

Also, these examples are just representative examples and not actual data (as actaul data is very sensitive, especially for financial organizations..!!)
Hope, you don't mind...

_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kimbert
PostPosted: Tue Oct 19, 2004 5:02 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Thanks for clearing that up.

This example
Quote:
USD,GBP,1,833,10/10/200
is actually unparseable unless the parser 'knows' that the field is at least two characters long. However, there's is a standard workaround for this which many CSV users opt for. Any field which contains the delimiter is quoted.
e.g.
Quote:
USD,GBP,"1,833",10/10/200

This makes it possible to parse the data without detailed knowledge of field lengths.

Using TDS to parse this is a bit tricky in the present version of the broker, but we are aware of the limitation. You'll probably want to refer to this post for some tips
http://www.mqseries.net/phpBB2/viewtopic.php?t=16510
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 » CSV message with data containing comma as well
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.