Date: Thu, 4 Jun 2009 19:34:20 -0400
Reply-To: msz03@albany.edu
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Zdeb <msz03@ALBANY.EDU>
Subject: Re: Import .csv data and values are enclosed by ||
Content-Type: text/plain;charset=iso-8859-1
hi ... given that the data are in a file named CARS.CSV and the first record is to be skipped ...
data cars;
infile 'z:\cars.csv' firstobs=2 dsd;
input @;
_infile_=compress(_infile_,'|');
input ID : $5. Year (Make Model) (: $15.);
run;
proc print data=cars;
run;
Obs ID Year Make Model
1 32135 2008 Toyota Camry
--
Mike Zdeb
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
> I am trying to import such following .csv dataset: (values are
> enclosed by || )
>
> |ID|,|Year|,|Make|,|Model|
> |32135|,|2008|,|Toyota|,|Camry|
> .....
>
> What kind of SAS code should I use? Thanks a lot
>
|