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 » IIB V9 how to preserve a comma coming inside double qoutes

Post new topic  Reply to topic
 IIB V9 how to preserve a comma coming inside double qoutes « View previous topic :: View next topic » 
Author Message
proton
PostPosted: Sat Jul 23, 2022 7:31 pm    Post subject: IIB V9 how to preserve a comma coming inside double qoutes Reply with quote

Novice

Joined: 14 Mar 2022
Posts: 11

Hi,

I am working on a maintenance project and the development was done in V9 and using MRM. We have to process a CSV file (delimiter comma ,). unfortunately we are some times getting data of a particular field in double quotes and then a comma inside.

Ex: 1,2,3,"3,4",5



in message definition while parsing it is treating comma inside the quotes also as a delimiter and not parsing properly..

intended output is

filed 1: 1
field 2: 2
field 3: 3
field 4: :"3,4"
filed 5: 5

Kindly please be noted no changes can be requested to the one who is sending file.. please let me know setting on MRM to preserve the comma inside the double quotes and dont treat it as a delimiter ..

Thanks,
Proton..
Back to top
View user's profile Send private message
proton
PostPosted: Sun Jul 24, 2022 5:49 pm    Post subject: Reply with quote

Novice

Joined: 14 Mar 2022
Posts: 11

Please advise.. Thank you.
Back to top
View user's profile Send private message
timber
PostPosted: Mon Jul 25, 2022 12:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
Please advise.. Thank you.
Please be patient. You posted your question during a weekend, and you are asking for free advice for an out-of-support version of IIB.

Quote:
please let me know setting on MRM to preserve the comma inside the double quotes and dont treat it as a delimiter ..
Since v8, the MRM parser is not the recommended method for parsing CSV.
If you really want to continue using MRM TDS, there are posts on this forum that describe how to solve this problem (although I am struggling to find them now).
The easiest and best solution is to switch to using DFDL. The CSV wizard will produce a DFDL schema that automatically handles this. And you can test it in the IIB Toolkit (using the DFDL Test perspective), and check that it handles your input data.
Back to top
View user's profile Send private message
proton
PostPosted: Mon Jul 25, 2022 9:21 am    Post subject: Reply with quote

Novice

Joined: 14 Mar 2022
Posts: 11

Thank you very much Timber and much appreciate your reply. Even i thought the same after posting my second reply. I truly agree with the DFDL but seems that is not the possibility here.

I tried some work around and conditions and added some code to the existing base and got very close to the solution. I will do more tests and post here if that works.

I tried to search the forum before posting and dint found any results seems my keywords are wrong.

Again thank you very much for the advise and i truly stand with each and every word you stated.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Jul 26, 2022 3:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
I tried some work around and conditions and added some code
No code is required. The TDS parser definitely supports this escaping style. I just don't remember the names of the properties that you need to set.

This may help, though (see the final post in this thread): http://www.mqseries.net/phpBB/viewtopic.php?p=255799&sid=4d41f90dd14396301c8e12065657ed5b
Back to top
View user's profile Send private message
proton
PostPosted: Tue Jul 26, 2022 5:21 am    Post subject: Reply with quote

Novice

Joined: 14 Mar 2022
Posts: 11

Thanks Timbert. Appreciate for taking time and directing to the post, my solution is also in the similar lines but i has to do some additional mapping and properties for my desired output.

Thanks and much appreciate your reply.. the thread you pointed gave me new tips that i will use for similar situation mentioned in that thread..
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 » IIB V9 how to preserve a comma coming inside double qoutes
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.