You might also indicate exactly how you need to use the variable with the same name.
You can add an variable than indicates which data set a specific record comes from such as
data work.combined;
set dataset1 (in=in1)
dataset2 (in=in2)
;
if in1 then Source='Dataset1';
else if in2 then Source='Dataset2';
run;
You could then use the Source variable in analysis to differentiate between the original set such as
proc freq data=combined;
tables source*var2;
run;
Note that multiple SET statements, while allowed by syntax, will get you into some pretty complex behaviors. I suspect that you only have as many records from the larger data set as appeared in the smaller one, especially if dataset1 is the smaller.