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 10:12:27 EDT
Reply-To:     Michele Marini <MARINI@VTVM1.CC.VT.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Michele Marini <MARINI@VTVM1.CC.VT.EDU>
Subject:      Macro help needed

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

************************************************************************* Michele Marini Statistics Department Virginia Tech (703) 231-8315 email:marini@vtvm1.cc.vt.edu *************************************************************************


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