You need to provide a lot more detail about what you have and what you are trying to do.
The NATURAL JOIN syntax in PROC SQL will autodetect matching variable names and use those as keys when joining datasets.
proc sql;
create table want as
select *
from a natural join b
;
quit;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.