Comma delimited file

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Ush
Participant
Posts: 55
Joined: Tue Dec 04, 2007 3:15 am

Comma delimited file

Post by Ush »

Hi

I have a comma delimited file.I have data as below

ab,cd,-Col1

dfg-col2

Since its comma delimted cd is assigned to col2.Please let me know how to avoid
Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

i do not understand what is your problem. Please describe it more clearly.
Wolfgang Hürter
Amsterdam
Ush
Participant
Posts: 55
Joined: Tue Dec 04, 2007 3:15 am

Post by Ush »

I have comma delimited file.The data for col1 has comma in between i.e ab,cd
Data for col2 is dfg.

since its comma delimited,cd is assigned to col2 instead of dfg.My requirement is ab,cd should go to col1.

Thanks
haimadhu3
Participant
Posts: 2
Joined: Thu Mar 29, 2007 3:18 am

Re: Comma delimited file

Post by haimadhu3 »

Hi Ush,

Actually, your question is not clear. But as per my understanding, you meant that you need to have the col1 as "ab,cd" , which is a concatenation of 2 cols.
To resolve this,you can read the delimited file with Comma specified as delimiter, and then you can concatenate the col1 and col2 later in next stage.

Regards,
Madhuri.
Ush
Participant
Posts: 55
Joined: Tue Dec 04, 2007 3:15 am

Post by Ush »

Sorry if I was not clear

I have 2 cols Subject Empid
Subject has the data :Arun,Hi
Empid:1233

File is as below:
Arun,Hi,1233

When I load Arun gets into subject hi gets into Empid...

Thanks
venbrk
Participant
Posts: 3
Joined: Tue Jan 15, 2008 5:12 am

hey...

Post by venbrk »

use the optioin Quotes: double and the data file should be like this...

Data File :
"Arun,Hi","1233"

then Arun,Hi will get into subject and 1233 will go into empid
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are rules about commas in data in comma-delimiited files. You can read about them in any product (such as Excel) that generates them. What you have is not a legally-formatted comma-delimited-format file.
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