Make a Macro and CALL EXECUTE(). Dummy Code could like : %reg(id=,date=); proc reg data=have(where=(id=&id and date between &date and %evalf(&date+&ws) )) noprint outest=stats&id&date tableout; model y=x; quit; %mend reg; %let ws=3; proc sort data=have(keep=id date) out=temp nodupkey;by id date;run; data _null_; set temp; call execute('%reg(id='||id||',date='||date||')' ); run; Xia Keshan
... View more