Date: Sun, 27 Mar 2011 14:13:39 -0400
Reply-To: Peter Flom <peterflomconsulting@MINDSPRING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject: Reading numeric data from a CSV file as if it was categorical
Content-Type: text/plain; charset="us-ascii"
I have to read in data from 17 large (each is many megabytes) csv files.
They have some columns where the data is really categorical, but where the
vast majority uses numerical codes, but somewhere (hundreds of lines in)
there is text data.
Of course, this makes SAS complain
Ordinarily, I'd fix all this up in Excel. But with so many large files that
would be a major PITA. So, how can I tell SAS that some columns should be
I wrote a mini-macro to read in the files:
PROC IMPORT OUT= WORK.&filename
DATAFILE= "C:\personal\Consults\Olivia Dixon\&filename..csv"
And I then use it on 17 files.
TIA as always
Peter Flom Consulting