Hello, I'm a beginner using SAS university edition. I have a data set containing flight information and a variable Country. I am trying to write a macro where i could call the macro with varying values of Country as parameters, for example, %subset("US","CA") or %subset("US","AU","CH"). I tried using the PARMBUFF option but got an error ERROR: User does not have appropriate authorization level for library WC000001. My code is %macro subsets/parmbuff;
%let num=1;
%let dsname=%scan(&syspbuff, &num);
%do %while(&dsname ne);
data &dsname;
set myexcel;
If country in (&dsname)then output;
run;
proc print data=&dsname;
run;
%let num=%eval(&num+1);
%let dsname=%scan(&syspbuff, &num);
%end;
%mend subsets;
%subsets("US","CA"); I would appreciate any help to point out my mistakes. thankyou
... View more