Dear all,
I'm a beginner for SAS macro. I want to set up a macro to run the data step for several datasets. For example, my code for one datasets is like:
proc sort data=VarA; by year; proc means data=VarA n nmiss noprint; by year; var a; output out=summary1; data a_summary; set summary1; if _STAT_ ^= "N" then delete; keep year a; run;
And I also have datasets: VarB, VarC, ... VarZ..., total 32 datasets. For each dataset, I want do the same procedure, but the names of datasets (VarA, VarB,...) and vars (a, b, ...) are different. So I'm wondering if I could set up a macro to do this.
Any help is much appreciated. Thanks!
Best,
Hua
... View more