Help in Reading a File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Help in Reading a File

Post by mac4rfree85 »

Hi Guys,

I have an issue in reading a file.
File is a Comma Delimited File with Quotes on Data.

But the issue is some Data in one of the column is having " (1") and comma.

Code: Select all

"PENCIL GRIPS, 5PK      ",
"Econ VW Binder White 1"  ",
I need to insert the data as it is to the Target Database.

Can somebody help me as how to read it without losing the Quotes as well as comma.

Cheers!!!!
Mac4rfree
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your file is breaking the rules. If strings are delimited by double-quote, they can't contain double-quote. Get the provider of the file to get it right - either use a different delimiter character (or none), or double the internal double-quote.

Code: Select all

"Econ binder (white, 1"") "
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

ray.wurlod wrote:Your file is breaking the rules. If strings are delimited by double-quote, they can't contain double-quote. Get the provider of the file to get it right - either use a different delimiter character ...
Ray, there is a option in the Columns tab of the Sequentail stage "Contains Terminators". I have changed it to contain Yes. Even then we will not be able to read it?

What does this column(option) does. Can you shed some light on this.

and Thanks for your help :)
Mac4rfree
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Record terminators, like a line-feed in the middle of your data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

chulett wrote:Record terminators, like a line-feed in the middle of your data.
Yeah thanks for the information.. On further analysis found that the file is fixed length even though it contain comma as delimiter.
So processed it as Fixed length file itself..

Thanks for the information though. :)
Mac4rfree
Post Reply