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 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 30 Mar 2007 10:34:28 -0400
Reply-To:   "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject:   Re: iterative %do loop in macro language
In-Reply-To:   <200703292245.l2TJeS5k015432@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset=us-ascii

> From: Raj > Is there a way in macros iterative do-loop to loop through a > series of words? For example, I have a list of words like > 'import', 'export', 'configure'. > > I need to loop through each of the words like this. > > %do i = import, export, configure; > > ...more macro statements using the value of &i ; > > %end; > > But macro iterative do loop only allows integer values. I > know that we can do this in regular do-loop (like do i= > import, export, configure; ). Can we do the same in macros as well?

I have one paper about how to use macro arrays.

SUGI 22: 1997 San Diego CA Coder's Corner 80 %ARRAY %ARRAY: construction and usage of arrays of macro variables http://www2.sas.com/proceedings/sugi29/070-29.pdf

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

see also sugi31.040 Tight Looping With Macro Arrays. Ted Clay http://www2.sas.com/proceedings/sugi31/040-31.pdf


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