LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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?
Comments: To: sas-l@uga.edu
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.


Back to: Top of message | Previous page | Main SAS-L page