I normally prefer SQL for such cases. I feel it's "cleaner".
data a;
input ID x $;
datalines;
1 a
1 b
3 c
;
run;
data b;
input ID y $;
datalines;
1 a
1 b
1 c
;
run;
proc sql;
/* create table want as */
select
coalesce(a.id,b.id) as id,
a.x,
b.y
from a
full join b
on a.id=b.id and a.x=b.y
;
quit;

The relationship between your tables with the keys used is actually not many:many but 1:1 (well: 1 or zero : 1 or zero).
For many:many joins the result (number of rows) between a SQL join and a data step merge will differ (most of the time you're after the SQL result).