Date: Wed, 5 May 2004 11:56:51 -0400
Reply-To: "Lustig, Roger" <roger.lustig@CITIGROUP.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Lustig, Roger" <roger.lustig@CITIGROUP.COM>
Subject: Re: another newbie question / SET
Content-Type: text/plain; charset="iso-8859-1"
If you wish to enumerate the five data sets, you need a smaller macro.
Remember: =====> SAS macros write SAS code <=====
That's all they do. What you want is a macro that writes five dataset names. You don't even want to write the whole SET statement--just the stuff between the SET keyword and the semicolon. (So make sure your macro doesn't write semicolons!)
%do I=&from %to &to;
Note that WORK is the default library, but that you can use any other.
Note also that you can mix and match:
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: Wednesday, May 05, 2004 11:47 AM
Subject: another newbie question / SET
Thanks so much for your patient help yesterday. Now I am trying to stack five data sets using the SET command, and although I get no error message, I also get no results. Each data set has 10,000 records and 10 variables.Any suggestions?
SET helmcond1 helmcond2 helmcond3 helmcond4 helmcond5;
I also tried this:
%DO k= 2 %TO 5;
set helmdata1 helmdata&k;
Helen C. Dennis
Assessment and Analysis Group
Delaware Department of Education
P.O. Box 1402
Dover, DE 19903-1402
Tel: (302)739-6700 Fax: (302) 739-3092