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 (May 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 21 May 2004 08:49:20 -0400
Reply-To:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:   Re: Scope of Macro Variables
Content-Type:   text/plain; charset="US-ASCII"

> From: Quentin McMullen [mailto:quentin_mcmullen@BROWN.EDU] >"Quentin McMullen" <quentin_mcmullen@BROWN.EDU> wrote:

>Agree with Ron, that a macro without any parameters is a silly macro

ah, well, now that I have a lot of others behind me, I'll qualify my statement, just to keep things interesting.

macros occur in several places: * SAS-provided directories aka SASautos * site-provided directory of macros * project directory, i.e.: SASinitialFolder * within a job==program

a meander thru the SASautos directories will turn up some SAS-supplied macros without parameters

iirc AnnoMac is one good example C:\Program Files\SAS\SAS 9.1\core\sasmacro\annomac.sas Users of Annotate facility can bring in all the Annotate family of data step macros with the single line: %annomac which effectively %includes Annomac.sas and all the teeny macros within it. 9 of 40 macros within AnnoMac do not have parmeters. YeahBut, there is ample documentation in the Annotate manual.

a round-about kludge, yes.

I don't have a real problem with a macro without parameters **-- within a program --** that is, where one can read the macro and see what it is doing on the same page,

Ian Whitlocks paper in SUGI 29 http://www2.sas.com/proceedings/sugi29/244-29.pdf contains several example of generating test data within macro loops

and one can find lots of macros within the SAS-L archives named like %DOIT %DOTHIS etc.

summary: macro without any parameters -- in project or site directories -- is a hard-to-understand-exactly-what-it-does macro.

check our most excellent archives: http://www.listserv.uga.edu/archives/sas-l.html search for: "%DOI" substring search: [X] subject contains: author's address: since: Jan 2004 until:

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov


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