我使用select来创建一个宏数组
proc sql;
select numValue into:num_value separated by ' ' from tableA;
quit;
%put %scan(num_value,1);
但是,宏num_value中的值没有按原始顺序(从小到大)排列它们的数值。
那么我怎么能根据它们的索引来确定它们的值是下降还是上升,或者宏数组与原始表的顺序相同。
谢谢!
如果我正确理解你的问题,你想在宏变量中订购值,你可以这样做:
proc sql;
select height into:height from sashelp.class order by height;
quit;
%put &height;