When I run into this issue, I use this construct in SQL. There are other ways in base SAS such as SORT or FREQ, but I usually revert to this construct because I work directly in the RDBMS a lot.
proc sql;
create table test as
select cik, count(0) as count
from wrds_cik5
group by cik
having count(0) > 1;
quit;
proc sql;
create table test as
select cik, count(0) as count
from wrds_cik_a
group by cik
having count(0) > 1;
quit;
The output should be zero records, meaning your keys (group by variables) uniquely identify each record.
For a LEFT JOIN, you can have dups in the left table, but if you have dups in the right table, your target table will "explode".
... View more