各位大神好,下文是我写的关于输出指定数值的全排列的宏,但是运行后总是提示“ERROR: 找到的位置参数多于定义的个数。”希望大神们帮忙指点下,非常感谢!
%macro PNN (n=,outfile=);
data cre_ar(drop=i) ;
array x[&n];
%do i=1 %to &n.;
x[&i]=i;
%end;
%let nfact=%sysfunc(fact(&n));
%do j=1 %to &nfact;
call allperm(&j,of x[*]);
output;
%end;
run;
proc print data=cre_ar out=&outfile;
run;
%mend;
%PNN(6,pnn_rslt);