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 (March 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 29 Mar 2010 00:09:19 -0700
Reply-To:     framon <frederick.raymond@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         framon <frederick.raymond@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: How to loop the argument of a macro
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On 29 mar, 07:44, "Jinto83" <jint...@sina.com> wrote: > Hi, > > How do I run a loop say %calculatetemperature(argument=), on a list of 100 arguments: > > 1975 > 1988 > 1930 > 1999 > .... > > So that in essence I invoke the macro 100 times ,each time with a different input argument. > > --- news://freenews.netfront.net/ - complaints: n...@netfront.net ---

what about a macro that call an other macro:

%macro calculatetemperature(argument); %put &argument; %mend;

%macro loopmacro; %let cpt=1; %do cpt=1 %to 10; %calculatetemperature(&cpt); %end; %mend;

%loopmacro;


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