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 (August 2000, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 31 Aug 2000 15:17:28 -0400
Reply-To:     "Tift, Brian" <bet5@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Tift, Brian" <bet5@CDC.GOV>
Subject:      Re: DDE questions
Comments: To: 'José Ailton Alencar Andrade'
          <andrade@INEP.GOV.BR>
Content-Type: text/plain; charset="iso-8859-1"

To answer part of your question:

The following code will create a list of all the variables in a specific data set and store it in a macro variable named varlist.

NOT TESTED:

data dataset; do i=1 to 100; x=ranuni(i); y=10+x; z=x-10; end; run;

proc sql; select name into: varlist separated by " '09'x " from sashelp.vcolumn where memname="DATASET"; quit;

filename out dde 'excel|c:\temp\[book1.xls]Plan1!l1c1:l10c7';

data _null_; set dataset; file out; put &varlist; run;

HTH

Brian Tift

--------------------------------------------------------------------------- The last question. I noticed that SAS only export when I state the command "put <variables>". This is a problem when I have a big sas dataset, beceuse I will have to write every variable name. How can I make to SAS export every variable without state that in "PUT" command?

data random; file out; do i=1 to 100; x=ranuni(i); y=10+x; z=x-10; put x y z; end; run;


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