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 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 8 Mar 2001 08:13:42 -0800
Reply-To:     Pete Lund <pete.lund@NWCSR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Pete Lund <pete.lund@NWCSR.COM>
Subject:      Re: Macro resolution in 8.1 vs. 6.12
Comments: To: sander.post@STATCAN.CA
Content-Type: text/plain; charset="iso-8859-1"

Hi Sander, This problem is fixed in 8.2. It's documented, with an 8.0/.1 work-around in the following SAS Tech Support note:

http://www.sas.com/service/techsup/unotes/SN/001/001011.html

--------------------------------------------------------------- Pete Lund Northwest Crime and Social Research 313-D Fifth Avenue SE Olympia, WA 98501 (360) 280-4892 -- voice (360) 570-7531 -- fax pete.lund@nwcsr.com www.nwcsr.com ---------------------------------------------------------------

----- Original Message ----- From: <sander.post@STATCAN.CA> Newsgroups: bit.listserv.sas-l To: <SAS-L@LISTSERV.UGA.EDU> Sent: Thursday, March 08, 2001 7:47 AM Subject: Macro resolution in 8.1 vs. 6.12

> The following is a much simplified version of code that I've inherited. It > works fine and as expected under 6.12. > > Under SAS 8.1 however, it crashes. > > It seems a macro call with a macro variable in it resolves in the wrong > order. With the macro variable r having a value of i, the call > > %err&r(104); > > calls the macro %err and generates a number of errors, including array I is > not defined. > > Under 6.12 it calls %erri with the parameter 104, which is the desired > effect. > > For now, we are continuing to run this under 6.12, but as that won't always > be an option, does anyone have any ideas short of rewriting the program > (there are a number of programs with the same general setup) to solve this? > Perhaps a macro option - I couldn't find any reference to this under the > version 8 macro documentation under changes and enhancements. > > --- > > %macro err(message); > message=&message.; > put "macro err" message=; > %mend err; > > %macro erri(message); > message=&message.; > put "macro erri" message=; > %mend erri; > > %macro keyflds(var1,r); > > data x; > %if &var1=INC %then %do; > %err&r.(104.00); > %end; > run; > %mend keyflds; > %keyflds(INC,i); > > Thanks, > > Sander. >


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