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 null escape character

Post new topic  Reply to topic
 csv null escape character « View previous topic :: View next topic » 
Author Message
madi
PostPosted: Fri Jun 27, 2008 6:54 am    Post subject: csv null escape character Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

i have csv msg set defined. i get the msg in as csv and doing some translation after that

i have the csv file defined with escape character as quote
i get an error because its not able to parse it correctly here is the error

Code:
   (0x01000000):ConversionException = (
                  (0x03000000):File     = 'F:\build\S600_P\src\cpi\bsutils\datacnv.cpp'
                  (0x03000000):Line     = 606
                  (0x03000000):Function = 'DataCnv::StrToInt64'
                  (0x03000000):Type     = ''
                  (0x03000000):Name     = ''
                  (0x03000000):Label    = ''
                  (0x03000000):Catalog  = 'BIPv600'
                  (0x03000000):Severity = 3
                  (0x03000000):Number   = 5505
                  (0x03000000):Text     = 'CPI Converter Input Data Invalid'
                  (0x01000000):Insert   = (
                    (0x03000000):Type = 5
                    (0x03000000):Text = 'string'
                  )
                  (0x01000000):Insert   = (
                    (0x03000000):Type = 5
                    (0x03000000):Text = 'No|c. About the same|3'


if i dont have the escape char defined i get this in the output
"UNPLANNED_MAINTENANCE"

which makes sense coz its not escaping the "

what am i doing wrong?

--madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 27, 2008 7:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

ESQL uses the single quote as a string delimiter.
Your choice of an escape char is not a good one. You'd be better off with the \ as escape char.

You did not specify the type of your output. From the exemple we can infer that your output is either in XML or HTML format.

As such " for the quote is a legitimate value as it is going to be rendered as a quote.

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
madi
PostPosted: Fri Jun 27, 2008 7:46 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

here is my input message ........ i am not using esql to escape the " i thought it will be escaped but the MRM parser just like the sample does?

Code:
481880|"111274"|"802-1013951"|""|"UNPLANNED_MAINTENANCE"|"RANDY"|3|4|4|3|4|3|3|"No"|"c. About the same"|3|3|3||"NO"|2008-06-19 14:32:00|""|""|""|"AW"|1033491      

_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jun 27, 2008 7:52 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Well it looks like the quotes are being interpreted as part of the field contents.... Review your message definition...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
madi
PostPosted: Fri Jun 27, 2008 8:08 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

thats my point .................. if i give the escape character, its escaping the " but giving me the exception

if i dont give the escape character, its putting the quotes in my output

also, the same thing will happen when creating an output csv file, how do i get it to put quotes in for text fields??

thanks
madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
madi
PostPosted: Mon Jun 30, 2008 5:29 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

does anyone have any ideas on how to define a CSV with quotes around the char fields in MRM??

Thanks
madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 07, 2008 4:40 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You cannot use the 'Escape character' property to handle CSV-style quoting. It only allows you to escape a single character.

The v6.1 samples gallery contains an excellent sample about CSV. There may well be a DeveloperWorks article containing the same info.
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 null escape character
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.