As part of a larger assignment, I'm trying to use PROC IMPORT in SAS to read in an Excel CSV file without headers or commas. I'm not sure why the CSV file doesn't have comma separators, but that was the assignment I was given. This has been my code so far:
data states;
input state $ avgRain roadLength population;
PROC IMPORT
datafile = "C:\Users\Shane\Downloads\states1.csv"
DBMS = CSV
getnames = no
REPLACE;
run;
When I do PROC PRINT, nothing happens. When I do PROC CONTENTS, it tells me only one observation was parsed in. When I try to see the table in SAS, it give me an error of "Tables with 0 columns are not supported by this object. Works.states cannot be opened"
I've also attached a screenshot of the data I'm trying to read in.
What am I doing wrong?
FL 54.5 122391 19552860
GA 50.7 127492 9992167
AL 58.3 102018 4833722
NY 41.8 114800 19651127
MI 32.8 122284 9895622
TX 28.9 313596 26448193
VT 42.7 14238 626630
OR 27.4 73479 3930065
data
step orproc import
, as Tom pointed out in his answer. – user2877959