How can I use a macro step to print an error, where values are not one to one in column a and column b? For example in the above dataset "slow"-2, "other"-3 are one to one, but "fast" -1 is not one to one.
proc sql;
create table want as select distinct a,b from have order by a,b;
quit;
data _null_;
set want;
by a;
if first.a and not last.a then
put a= b= "is not one to one";
run;
proc sql;
create table want as select distinct a,b from have order by a,b;
quit;
data _null_;
set want;
by a;
if first.a and not last.a then
put a= b= "is not one to one";
run;
Thanks for the quick response! However this method still requires some eyeballing work. Is there a way to directly print out only the lines with error?
Thanks for the quick response! However this method still requires some eyeballing work. Is there a way to directly print out only the lines with error?