First, I would always read the log. You ignore the log at your own peril.
Second, I would consider your expectations about the merge, and state those expectations so that if they are violated, they will throw an error message.
For example, if I am merging two datasets, and I expect that both of them are unique by ID, and I expect all the records in both to match, I will code:
data c;
merge a (in=a) b (in=b);
by id;
if NOT (a=b) then put "ERROR: mismatch records " (id a b)(=);
if NOT (first.id and last.id) then put "ERROR: duplicate found " id=;
run;
I'm also a fan of system options that throw as many errors as possible, e.g. :
options dsoptions=note2err msglevel=i mergenoby=error;
dsoptions=note2err is undocumented but it converts a lot of bad log notes into errors. msglevel=i throws an INFO: line to the log when two varibles collide. Mergenoby=error throws an error if you forget the BY statement.
... View more