You can use even more simple logic: if NOT (a and b); like this:
[pre]
data a;
x=1; output;
x=2; output;
run;
data b;
x=3; output;
x=2; output;
run;
proc sort data=a;
by x;
run;
proc sort data=b;
by x;
run;
data dif;
merge a (in=a) b(in=b);
if not (a and b);
by x;
run;
[/pre]
Sincerely,
SPR
Yes.
There is another way.Try to use proc sql + except .
[pre]
data temp;
set sashelp.class;
where sex eq 'F';
run;
proc sql;
select *
from sashelp.class as a
where a.sex not in (
select b.sex
from temp as b
) ;quit;
[/pre]