Page 1 of 1

double quote in sequential file

Posted: Mon Sep 24, 2007 4:38 am
by dnat
I have a a Sequential file where the records are delimited by comma(,) and double quote.

There is a record like this in the data file:-



"1111111","aa aa aa","""xxxxxx""","nnnnn"

But when i read this record in the sequential file , it is getting rejected. i think this is because of more than one double quote enclosed for the field "xxxx". But i would like to process this record as there are equal number of start and end quotes. Is there a way to process this.

Thanks

Posted: Mon Sep 24, 2007 5:04 am
by Maveric
What data type have you declared the field with value """xxxxxx""" as? Try with Varchar and then in modify or transformer stage you can use trim function to remove the quotes.

Posted: Mon Sep 24, 2007 5:09 am
by dnat
i have declared it as varchar. The record is getting rejected in the Sequential file stage itself. It is not even passing to the next stage.

Posted: Mon Sep 24, 2007 5:59 am
by ray.wurlod
If there are no double-quote characters in the data, then use a Filter command to get rid of them. The tr -d \" command would be fairly efficient.

You could also set the Quote Character property to None, which would mean that the quote characters become ordinary data, but could be removed subsequently with a Trim() function.