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 » Handling CSV message

Post new topic  Reply to topic
 Handling CSV message « View previous topic :: View next topic » 
Author Message
neeha_kashyap120
PostPosted: Tue Aug 18, 2009 6:10 am    Post subject: Handling CSV message Reply with quote

Apprentice

Joined: 05 Mar 2009
Posts: 31

Hi

I am doing a CSV -->XML transformation. The element delimiter is , and the record delimiter is <LF>. The customer is sending the message as following

Code:
data1,data2,data3,data4,data5,<LF>


the message is supposed to have only 5 fields but they are sending a , at the end of the 5th field. SO when its converted to XML the last field is parsed as "data5," any ideas how to handle this.

Thanks in advance
Neeha
_________________
Neeharika Kashyap
IBM Certified System Administrator - WebSphere MQ V6.0
Trying to be IBM Certified System Administrator - WebSphere Message Broker V6.1 and IBM Certified Solution Developer - WebSphere Message Broker V6.1
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 18, 2009 6:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Change the record delimiter to ,<LF>
Back to top
View user's profile Send private message
neeha_kashyap120
PostPosted: Tue Aug 18, 2009 6:21 am    Post subject: Reply with quote

Apprentice

Joined: 05 Mar 2009
Posts: 31

Hi Jeff

I already tried that, did not work. Still the 5th field is populated as "data5,".

Neeha
_________________
Neeharika Kashyap
IBM Certified System Administrator - WebSphere MQ V6.0
Trying to be IBM Certified System Administrator - WebSphere Message Broker V6.1 and IBM Certified Solution Developer - WebSphere Message Broker V6.1
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Aug 18, 2009 4:44 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I already tried that, did not work. Still the 5th field is populated as "data5,"
It should have worked. I suspect that you forgot to redeploy. Can you try again, perhaps with debug-level user trace enabled so that you can see what the TDS parser is up to?

If the trailing comma is *always* in the data, mqjeff's solution will work.
If it is sometimes there and sometimes not, you have two options
a) add a 6th field with minOccurs="0", and ignore it in your flow
b) wrap the entire line in a group with GroupTerminator='',<LF>'. Set the Group Terminator for the line itself to just <LF>. Make sure that both the group and the line have maxOccurs set correctly.
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 » Handling CSV message
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.