Wow, that datastep is so clean compared to a Proc SQL. I needed Proc SQL for my case because with Proc SQL it will not print anything to the output window if the dataset is empty.
Thank you for the help!
And I really need to read more about coalesce and full joins!
data ONE;
input ID X $;
cards;
1 a
2 .
3 c
6 a
;
data TWO;
input ID Y $;
cards;
1 a
2 b
5 d
6 e
;
proc sql;
create table want as
select coalesce(a.id,b.id) as id,x,y
from
(select * from one except select * from two) as a
full join
(select * from two except select * from one) as b
on a.id=b.id;
quit;
Thank you Ksharp! both your code and Reeza's worked. I would have accepted both as a solution but it only allowed me to pick one so I just picked one that replied earlier hopefully you are okay with it. I really appreciate your help on this! I learned from both of your codes! Thanks again!
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.