File Delimeter

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
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

File Delimeter

Post by vinsashi »

Hi,
my source file is comma delemeter. and data i have like this

Code: Select all

pdid,pdcost,pdnm
a001,10,000,XXX
b001,20,000,YYY
c001,1,00,000,ZZZ
when i am reading in sequntial file i am getting wrong data
under pdcost.underproduct cost i wil get data like this
10,000
20,000
1,000,000
In windows environment i am working..

Thanks
Vin...
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

Any help on this
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Learn patience. The rest of the world does not work on Indian Standard Time.

Further, the rules for producing the output are not well (clearly) stated. Try to come up with a specification in English about how each target row is to be produced from its corresponding source row.

You might also answer why you have three column headings but four or five columns in your data rows.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Looking at the data and using my interpretation of your requirement...

the numeric value pdcost has comma separation for its units and so are your fields. Hence the confusion.

Use a different field separator.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post by gssr »

For this situation,
Read the file as fixed lengh field and then try to solve the delimiter issue in transformation

Hope it works!
RAJ
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

File is not fixed length.

You can read as single variable length field and work from there..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You've been supplied an invalid csv file. Those amounts need to be quoted so they can be properly read, that or they should not have those internal commas.

Code: Select all

pdid,pdcost,pdnm 
a001,"10,000",XXX 
b001,"20,000",YYY 
c001,"1,00,000",ZZZ

Code: Select all

pdid,pdcost,pdnm 
a001,10000,XXX 
b001,20000,YYY 
c001,100000,ZZZ
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply