If the idea is to add an indicator based on the source data set use the data set option IN. In creates a 1/0 temporary variable that indicates the current record comes from a given set (1) or not (0). So you can perform any conditional calculations you need to set such things. Below is very generic example
data want;
set dataset1 (in=inset1)
dataset2 (in= inset2)
;
if inset1 then indicator = 1;
else if inset2 then indicator=0;
/* or what ever variable /values you want to set*/
run;