sas宏程序
- 作者: 聆听花语77432373
- 来源: 51数据库
- 2020-10-03
试试
%macro test;
%do x=10 %to 100 %by 1 ;
%do y=0.1 %to 9 %by 0.1;
%cut(&x.,&y.,out&x.);
%end;
%end;
%mend;
%test
1、 用proc transpose把变量变成observation;
2、 用proc means把observation变成list;
3、 用file put把list输出到txt;
4、用%include把list读到宏里面循环。
%macro test;
%do x=10 %to 100 %by 1 ;
%do y=0.1 %to 9 %by 0.1;
%cut(&x.,&y.,out&x.);
%end;
%end;
%mend;
%test
1、 用proc transpose把变量变成observation;
2、 用proc means把observation变成list;
3、 用file put把list输出到txt;
4、用%include把list读到宏里面循环。
推荐阅读
