Date: Mon, 20 Oct 2008 00:59:23 -0700
Reply-To: Eason Chu <Shen-Jian.Zhu@STANDARDCHARTERED.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Eason Chu <Shen-Jian.Zhu@STANDARDCHARTERED.COM>
Organization: http://groups.google.com
Subject: How to read such kind of raw data?
Content-Type: text/plain; charset=ISO-8859-1
I have a raw data file (.csv), whose fileds are seperated by a comma
and embedded with double quotation marks. Its patern looks like as
below,
"XXX","XXXXXXX","XX",...
"XXX","XXXXXXX","XX",...
I used the following code,
Data a (compress=yes);
infile "infile location" dsd missover lrecl=1000000
firstobs=2;
informat ...;
format ...;
input ...;
run;
But some of the input fileds' value contain double quotation marks and
even commas, appearing to be as below:
"XXX","XX"XXXX","XX",...
"XXX",""XXX,XX","XX",...
However, there ill-mannered field values disrupted the data input.
I don't know how to read and input such raw data in a SAS data set.
Please give me some suggestion which will be much appreciated.
|