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
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;