The type of join condition descides how the "merge" is done. Using full join selects all rows from each tabe.
This example might work?
data a;
length a a1 $10;
input a a1;
datalines;
two hands
tree hands
;
run;
data b;
length b b1 $10;
input b b1;
datalines;
one leg
two legs
;
run;
proc sql;
create table c as
select coalesce(a.a, b.b) as c
,a.a1
,b.b1
,ifc(missing(a.a),'N','J') as ina
,ifc(missing(b.b),'N','J') as inb
from a
full join b
on a.a = b.b
;
quit;
//Fredrik