Page 1 of 1

Reading " from a sequential file with quotes double set

Posted: Wed Oct 15, 2008 8:38 am
by devanathan_82
Hi,

I am trying to write " as a literal in the file. The sequential file stage to read this has Quotes=double specified in the format. This is a common job so I cannot remove the quote or change it as some other jobs might be impacted. Is there a way that I can pass the double quotes in my data as a literal without the File stage treating it as a format string and delimiting fields.

Posted: Wed Oct 15, 2008 9:03 am
by ArndW
Embedded quote characters in strings need to be doubled in order to be correctly read in again, i.e. the string would need to look like

Code: Select all

"Hello ""World"""
in order to represent the string

Code: Select all

Hello "World"

Posted: Wed Oct 15, 2008 12:45 pm
by devanathan_82
I tried this option of doubling the quotes. But it reads the Hello in the first field and after seeing the double double quotes skips to next field and reads World"" as the next field. The " are read in the World string but for the wrong field.