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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!