data test;
input day id$;
cards;
1 abcde
2 bcdef
3 cdefg
4 fghijk
;
run;
data test2;
do a = 1 to 4;
set test point= a;
m = id;
do b = 1 to length(strip(m))-1;
do c = b+1 to length(strip(m));
x = substr(m,b,1)||substr(m,c,1);
do d = a to 4;
set test point = d;
n = id;
do e = 1 to length(strip(n))-1;
do f = e+1 to length(strip(n));
y = substr(n,e,1)||substr(n,f,1);
if m ne n and x = y then output;
end;
end;
end;
end;
end;
end;
stop;
stop;
run;
proc print;
run;
SAS 练习
最新推荐文章于 2020-08-07 18:07:18 发布