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 (July 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Jul 2009 14:06:55 -0700
Reply-To:     "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject:      Re: macro variable resolution
Comments: To: reply@TO-GROUP.NFO
In-Reply-To:  <wRs5m.1723$P5.1681@nwrddc02.gnilink.net>
Content-Type: text/plain; charset="us-ascii"

Try &&p&i. But consider that the second iteration of the PROC TRANSPOSE will completely replace the data set created in the first iteration.

-----Original Message----- From: theorbo Sent: Thursday, July 09, 2009 1:58 PM To: SAS-L@LISTSERV.UGA.EDU Subject: macro variable resolution

How do I get this to resolve correctly? What kind of ampersands in the "DATA=" do I need and why? It's almost like I want the macro processor to resolve it twice so that it gets the correct result but I haven't had any luck.

Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%LET p1 = <filename1> %LET p2 = <filename2>

%MACRO makeit %DO i = 1 %TO 2 PROC TRANSPOSE DATA= &p&i OUT=transposed; RUN;

%END; %MEND makeit;

%makeit


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