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 2004, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 29 Jun 2004 15:32:43 -0700
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Reading desired column 's from CSV FILE
Comments:   To: taran Singh <taran_jit@YAHOO.COM>

Taran-

You'll probably need to read the whole file, line by line, parsing out the column you want. If you post sample data you'll get specific answers. Here's a solution just using proc import:

PROC EXPORT DATA= SASHELP.CLASS OUTFILE= "CLASS.CSV" DBMS=CSV REPLACE;

PROC IMPORT OUT=CLASS DATAFILE= "CLASS.CSV" DBMS=CSV REPLACE; GETNAMES=YES; DATAROW=2;

data CLASS; SET CLASS(keep=name age); RUN;

hth

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of taran Singh Sent: Tuesday, June 29, 2004 3:20 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Reading desired column 's from CSV FILE

Hi folks: Can you please provide an insight on how can i read specific column's from a csv file . If the struture of the csv file is dynamic . I have the column's names.

Thanks in advance

Taran

--------------------------------- ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself


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