It is not clear enough what you want to get.
As much as I understand you need somthing like:
data RevenuA revenuB revenuC;
merge tableA(in=inA rename=(revenue=revA))
tableB(in=inB rename=(revenue=revB))
tableC(in=inC rename=(revenue=revC))
;
by Location_number date hour Quarter_Hour ;
if inA (... and conditions ...) then do;
revenu = revA;
output RevenuA;
end;
if inB (... and conditions ...) then do;
revenu = revB;
output RevenuB;
end;
if inC (... and conditions ...) then do;
revenu = revC;
output RevenuC;
end;
RUN;