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 (June 1996, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 6 Jun 1996 16:12:29 GMT
Reply-To:     Bosco Ho <bosco.ho@FMR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Bosco Ho <bosco.ho@FMR.COM>
Organization: Fidelity Investments
Subject:      Re: Macro help needed

Michele Marini <MARINI%VTVM1.BITNET@VTBIT.CC.VT.EDU> wrote: >This seems like it should be possible, but I am having no luck at getting the >following code to work. > >The macro variables NTIME and NSITE are declared in the program above. What I >have, is I have different data step type problems where I want to execute them >NTIMES to get NTIMES variables. I have the macro loop set up, and as long as I >nest the code inside the loop, it works fine. My goal though is to use a %LET >statement to re-assign what the loop does on the inside. An example of the >code I have tried follows: > >%let s=%nrstr( > R&i=FR[((&i-1)*&NSITE))+1:&i*&NSITE, 1:&NSPECS]; > F&i=R&i`; > ); > >%macro loop; > %do i=1 %to &NTIME; > &s > %end; >%mend loop; > >loop > >I have tried several macro functions besides NRSTR, but none work. The code >that follows the NRSTR function works when I put it in place of the &s. But, >there are lots of 'things' that are generated with this particular loop, and >though it seems small, I would like not to have to type the macro loop over >and over again. Any help would be greatly appreciated. TIA. Michele Marini

kinda of a stupid question-answer, did U set up the 's' macro variable as a global?

sorry that i ve not looked too closely how your stuff works, but a lot of time i tend to forget to put the macro var in the global list but attempted to use it in multiple steps.

regards

bh

-- +===================================================+ | Std disclaimers apply: Any comments or stmts made | | are not necessarily those of Fidelity Investments,| | its subsidiaries, or affiliates. Plz address all | | personal emails to wboscoho@usa.pipeline.com Thx | +=================== """"""""""""""""""""""""" -----+

i hate netscape requires me to put more line in


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