Tina,
It would help if you put some sample code or how the variables were named. But if the date variables are the same, you can add the date variable to the sort statements and the merge statement.
proc sort data=table1;
by isin DIVDT;
run;
proc sort data=table2;
by isin DIVDT;
run;
data combined;
merge table1 table2;
by isin DIVDT;
run;
***This data contains only those that merge and match isin;
data matching;
set combined;
if nmiss(isin,stock,divdt,stockprice)=0;
run;
proc print data=matching; title1 'Matching'; run;
***If you need the set with the differences, use this;
data diffs;
set combined;
if nmiss(isin,stock,divdt,stockprice)>0;
run;
proc print data=diffs; title1 'Differences'; run;
That should help. If the date variables are different, you neet to rename a variable to match the variable that you are using to merge.
... View more