Date: Fri, 23 Jun 2000 13:07:07 EDT
Reply-To: David Wright <david_20000@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: David Wright <david_20000@HOTMAIL.COM>
Subject: Correction: Summary of "How to Save a generated dataset as .txt
file?"
Content-Type: text/plain; format=flowed
Hi, thanks Michael,
The code of second solution does miss the Output. So it is perfect and not
needed any debug.
thanks,
David
________________________
Hi,
Thanks to all the respondents to "How to Save a generated dataset as .txt
file?" Next I summed up 3 kinds of solutions suggested by over ten persons.
1. FILE--most often proposed--I will adopt this method;
data _null_; set tt;
file "File Name"
put @1 X @ 11 E @ 21 Y;
run;
2. LIBNAME and Data (proposed by Nancy and Michael Thomas)--There might be a
little bit further debug on the followed code.
* Issue LIBNAME statement for directory where dataset is to be stored;
libname save 'c:\sas\sasdata';
data SAVE.ttt;
Do I = 1 to 10;
X = 100*RANUNI(0);
E = 50*NORMAL(10);
Y = 5*X + E;
State=1;
END;
run;
3. DM ---I guess this is one of the simplest one. Just as David Ward(the
proposor) said, " You will be pleased with the results. This technique
makes use of SAS's external file interface SCL application, which they have
provided a means of calling in batch (without the wizard)." I agree.
dm "dexport libname.dataset 'c:\temp\temp.txt' replace";
-or-
dm "dexport libname.dataset 'c:\temp\temp.csv' replace";
I hope the above summary will be benificial all the sasers, esp. the
beginner, just like me.
Best,
David
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com