- %macro dropguance(index=,dat=,delim=%str(,));
- %let i=1;
- %do %while(%scan(%quote(&index),&i,%quote(&delim)) ne );
- %let Nindex=%scan(%quote(&index),&i,%quote(&delim));
- data &dat;
- set &dat;
- if &Nindex=. then delete;
- run;
- %put &i.;
- %let i=%eval(&i+1);
- %end;
- %mend;
- %let chosevars=cv,netppediva,bm,gsdiva,yroevot,rsq,meancashvot,yroavot,meanygsvot,lgcomtrdturnr,meanyincomevot,cost,drsbl,owncon1;
- %dropguance(index=%quote(&chosevars),dat=zonghe,delim=%str(,));