Hi,
I have some programs with multiple steps/procedures that I want to run with a loop. For example, the simplest one is:
data reg_temp;
set hotelJPQ.TueDBA0L1_daily;
where (Week_Code>=1) AND (Week_Code<=4);
run;
PROC reg data=reg_temp outest=reg_out_temp;
* parms b0 b1;
DEMAND: model demand = price;
run;
PROC EXPORT DATA= work.reg_out_temp
OUTFILE= "C:\Research\working papers\Joint price quant\Tue_SAS.xls"
DBMS=Excel;
SHEET="1";
run;
quit;
I would like to replace the numeric values in:
where (Week_Code>=1) AND (Week_Code<=4);
and
SHEET="1";
with a variable (say 'x') within a loop such as
Do x = 1 to 9;
Have tried various approaches including different macros but have had no success.
Is there an easy way (or even a way) of accomplishing this.
Thanks,
lmacdon4
... View more