|
Attempt to read four variables. f the fourth is null, then you have the three values you want. If the fourth contains text, concatenate the second, a comma, and the third and you will have the tree values you need.
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sasuser
Sent: Wednesday, November 11, 2009 10:34 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Reading CSV into SAS, but delimiter comma is part of data
Hi all -
I need to read an external CSV file which is comma delimited into SAS.
However, there is one field contains comma without quotation mark. How
can I read such data into SAS?
Example:
ID, Location, Income
1,New York, 30000
2,New York, NY, 40000
3,Austin, 3000
4,Lansin, 38999
What I need is the SAS dataset contains 3 variables (ID, Location,
Income), but because the second row has extra comma, it created the
fourth variable (var4). How can I make it correct?
|