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 (June 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 >


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