I have two SAS datasets. First one is Sep_release and second one is Oct_release. Both the datasets have REFERENCE_NUMBER as common variables. I want to find if the REFERENCE_NUMBER released in sep_release is also coming in Oct_release. Basically trying to find the duplicate REFERENCE_NUMBER in both the datasets. But I am unsure of best way of doing it. I tried proc sort and data step but not getting the result as the code is not right and I am unsure of the right way to approach. Can you please suggest?
data duplicate_REFERENCE_NUMBER;
set sep_release oct_release;
if not (first.REFERENCE_NUMBER) then output;
run;
Also, I tried this step
Proc sort data=sep_release
nodupkey dupout=oct_release;
by REFERENCE_NUMBER;
run;