Date: Wed, 27 Jan 2010 11:35:12 -0600
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: Interesting finding: Proc SQL create quoted name dataset!
Content-Type: text/plain; charset=ISO-8859-1
Did you see my suggestion for using the DATAn naming convention for
naming data sets created and managed by macros? It seems "best" and
safest to me.
/* create macro variables and populate with DATAn names */
%local outest output;
data _data_; stop; run; %let outest = &syslast;
data _data_; stop; run; %let output = &syslast;
/* create sorted working data save name to WORKING */
proc sort data=&data out=_data_;
/* use the DATAn names for output from proc reg */
proc reg data=&working outest=&outest noprint;
output out=&output r=r p=p;
proc delete data=&outest &output &working;
On 1/27/10, Ya Huang <firstname.lastname@example.org> wrote:
> A good one :-)
> Seriously, I'm thinking that maybe all datasets created and used inside
> macro should be quoted, so that they won't be mixed with dataset outside
> macro. This way, we'll never worry about overwrite the same named dataset.
> On Wed, 27 Jan 2010 04:20:02 -0800, montura <kevin@MONTURA.COM> wrote:
> >The best impliction woul be unreadable code - great for job security,
> >providing you never want a promotion.