part one:
%macro chess;
data %do i=1 %to 4; chess&i %end;;
set chess_history;
%do i=1 %to 4;
moveall=scan(move,&i,"|","m"); step=&i; output chess&i;
%end;
run;
data chessall;
set %do i=1 %to 4; chess&i %end;;
run;
proc sql;
create table want1 as
select distinct moveall as unique_chess
from chessall
having not missing(moveall);
quit;
%mend;
%chess;
part two:
from above dataset chessall, you can find possible combinations from step 1 to step 4.
hope it helpful and get your reward.


雷达卡


京公网安备 11010802022788号







