%macro test;
%let x1=a;
%let x2=b;
%let x3=c;
%let x4=d;
%let x5=e;
%let x6=f;
%let x7=g;
%let k=5;
%let ncomb=%sysfunc(comb(7,&k));
%do j=1 %to &ncomb+1;
%syscall allcomb(j, k, x1, x2, x3, x4, x5, x6, x7);
%let ncomind&j=&x1, &x2, &x3, &x4, &x5;
%put &&ncomind&j;
data zonghe&j;
set yourdata;
commark=sum(&&ncomind&j);
run;
%end;
%mend;
%test