LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 5 Mar 2008 16:26:46 -0500
Reply-To:     roger.s.clark@CENSUS.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "NOMAIL Roger S. Clark" <roger.s.clark@CENSUS.GOV>
Subject:      Re: macro?
Content-type: text/plain; charset=US-ASCII

> Hi All, > Anyone give any suggestions on how to do the following: (I get an > error on the %macro line) > > %let x = testermac; > %put &x; > > %macro &x; > %mend ; > > %testermac;

It has been years since I took any training in SAS macros. However, I seem to remember something about the macro being compiled first, before the rest of the program is compiled. (I might be hazy on that...) Consequently, your macro is being defined before the variable &x is resolved in the macro name. SAS isn't seeing %macro testermac, but a literal %macro &x.

Thanx, Roger S. Clark Address Products Management Branch 763-9177 4H584U


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