Date: Fri, 4 Jan 2008 08:16:45 -0800
Reply-To: Gradowsky <marchi.gianluca@LIBERO.IT>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gradowsky <marchi.gianluca@LIBERO.IT>
Organization: http://groups.google.com
Subject: reading a simple delimited file...
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
a "simple" input from an external file is getting me crazy....
I am trying to read into a dataset the following semicolon delimited
file named "file.csv":
v1;v2;v3
abc;def;ghi
jkl;;yhi
;iuu;jak
ass;asz;
;;awo
where first row are variables names.
This is the code I am using:
data ds1;
infile 'c:\file.csv' delimiter=';' firstobs=2 missover;
input v1 $ v2 $ v3 $;
run;
but what I get is not correct: all values seem to be aligned to left
and values take place of missing.
v1 v2 v3
abc def ghi
jkl yhi
iuu jak
ass asz
awo
what's wrong???
Thank you
Gianluca