JasonKQiao 发表于 2011-6-6 22:32 
如题,
data q.b#;set q.a2;if rownum=#;run;
想对这样的数据集进行批量的处理,#从1到151………………
一下是鄙人的代码,求大牛指导,O(∩_∩)O谢谢
%macro split;
%do i=1 %to 151;
data q.b&i;
set q.a2
if rownum=&i;
%end;
run;
%mend;
%split;
If the data set(q.a2) is small, it is fine. It is NOT efficient in general. Here you read the data set for 151 times, but you only need it once.