So use my program as it is generating ELSE statements so only one rule will apply.
Sort the data in the proper order before using it generate the code. To try your idea of apply the most complete rules first try using the value of CMISS() for the various conditions to sort. So rules with the fewest missing conditions will "win".
data rules;
set rules;
n_miss=cmiss(of Sport Tournament Held Age Country Season Year Length Surface);
run;
proc sort;
by n_miss;
run;
Note that the code is generated to a FILE, not the log. The code in the LOG is the code that RAN because of the %INCLUDE statement.
... View more