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 (December 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 18 Dec 2006 08:23:01 -0600
Reply-To:     Yu Zhang <zhangyu05@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Yu Zhang <zhangyu05@GMAIL.COM>
Subject:      Re: Macro variable not resolved
In-Reply-To:  <1166451434.364549.298050@l12g2000cwl.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Take the Double && out,

&&desc&i._&j --> Desc&i._&j

On 12/18/06, Priya <priyaworld2@yahoo.com> wrote: > > Hi Every1, > > I am trying to write a code for doing > > Gat32_1 = Gat32_1 * (BNDN1 + BNDP1) > Gat32_2 = Gat32_2 * (BNDN1 + BNDP1) > > Pow32_1 = Pow32_1 * (BNDN4 + BNDP4) > Pow32_2 = Pow32_2 * (BNDN4 + BNDP4) > > etc .... > > > But the following code gives me an error: > > %macro mac55; > > %let desc1= "Gat32"; > %let desc2= "Gat8pk"; > %let desc3= "Gat64"; > %let desc4= "Pow32"; > %let desc5= "TGAT"; > > %let pid1 = 2; > %let pid2 = 3; > %let pid3 = 4; > %let pid4 = 22; > %let pid5 = 40; > > %let n1 = 11; > %let n2 = 10; > %let n3 = 6; > %let n4 = 10; > %let n5 = 15; > > data fin_numdisp; > set b.fin_numdisp; > %do i = 1 %to 5; > %do j = 1 %to &&n&i; > &&desc&i._&j = &&desc&i._&j * (BNDN&&pid&i + BNDP&&pid&i); > %end; > %end; > > run; > > %mend mac55; > > WARNING: Apparent symbolic reference DESC1_1 not resolved. > > ERROR : Statement is not valid or it is used out of proper order. > > Please suggest a way. >


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