@novinosrin wrote:
noduprecs = select distinct * and not select distinct make ,type, origin
which apparently means the from table should only have the vars making it distinct and cannot support dataset option at execution time for noduprecs to work. Well, well what a nit!
Not quite, the order of the input data set matters a lot when using NODUPRECS, which is not intuitive. NODUPRECS only check the previous record, so if the data isn't sorted first it won't work either.
This is another way to get what the OP wants, with a double sort.
proc sort data=sashelp.cars (keep=MAKE TYPE ORIGIN) out=dsout;
by MAKE TYPE;
run;
proc sort data=dsout noduprec;
by MAKE TYPE;
run;
*want only 1;
proc freq data=dsout;
table make*type / list;
run;
*get only 1;
proc freq data=dsout;
table make*type*origin / list;
run;