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 (January 2010, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sun, 24 Jan 2010 15:21:55 -0800
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:   Re: Exporting SAS data in a Free-Column format
Comments:   To: Yaw <linkyox@gmail.com>
In-Reply-To:   <b2805853-a829-4a58-9095-6b3701f70cf3@p24g2000yqm.googlegroups.com>
Content-Type:   text/plain; charset=ISO-8859-1

Yaw,

As long as you define ID as a format z3. (or z whatever its length is) I think you can get what you want with something like:

data have; input id sex age ht; format id z3.; cards; 001 2 6 120 002 1 4 90 ;

PROC EXPORT DATA= WORK.HAVE OUTFILE= "c:\want.csv" DBMS=CSV REPLACE; RUN;

HTH, Art ----------- On Jan 24, 3:55 pm, Yaw <link...@gmail.com> wrote: > Hi Community: > > I have this data set in SAS that I want export in the free column > format(comma or space delimited) to enable me read it into another > program. > > My current data is in this format: > > id sex age ht > 001 2 6 120 > 002 1 4 90; > > and I want it in this format: 001,2,6,120,002,1,4,90. > > Any ideas? > > Thanks!


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