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 (April 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 30 Apr 2006 17:36:00 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: How to automatically change data name in SET?
Comments: To: c_groves@JUNO.COM
In-Reply-To:  <20060430.102141.11899.1084778@webmail45.lax.untd.com>
Content-Type: text/plain; format=flowed

C.L. Groves

I think you ment:

%macro monthn( month = ) ;

%do i=1 %to &Month ; month&i %end;

%mend ;

It does suffer the same problems as I mentioned in to Paul in my other post.

Toby Dunn

From: "C.L. Groves" <c_groves@JUNO.COM> Reply-To: "C.L. Groves" <c_groves@JUNO.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How to automatically change data name in SET? Date: Sun, 30 Apr 2006 17:21:06 GMT

might try this---

options symbolgen mlogic mprint;

%macro monthn(month); %do i=1 %to 3; month&i %end; %mend;

data month1; input a b c; datalines; 1 2 3 ; run; data month2; input d e f; datalines; 4 5 6 ; run; data month3; input g h i ; datalines; 7 8 9 ; run;

DATA RESULT; set %monthn(3); run;

proc print; run;

"..faith is the assurance of things hoped for, the conviction of things not seen."------>For I know the plans I have for you,plans to prosper you and not to harm you, plans to give you hope and a future."---->Try again, fail again, fail better. - Samuel Becket


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