I would just leave it in a tall structure. You can then produce that report using a reporting procedure like PROC REPORT, TABLULATE or FREQ.
data tall;
length indsname dsname $41 ;
set A B C indsname=indsname;
by name;
dsname=indsname;
run;
Obs dsname Name Money
1 WORK.A X 2000
2 WORK.B X 600
3 WORK.A Y 4000
4 WORK.C Y 8000
5 WORK.B Z 400
6 WORK.C Z 600
proc freq ;
tables name*dsname;
weight money ;
run;
... View more