double quote in sequential file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

double quote in sequential file

Post 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
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post 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.
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply