Hi:
If the data is as you describe, then either PROC TABULATE or PROC REPORT would be another way to do this. I'd probably use PROC REPORT because of the requirement to repeat the CUST_ID on every report row.
cynthia
[pre]
data cust;
infile datalines;
input cust_id acct hierarchy $ amt : comma4.;
return;
datalines;
1 123 aa $100
1 125 bb $250
1 121 cc $125
2 234 aa $100
2 254 aa $300
3 333 aa $200
3 345 bb $250
3 365 bb $210
3 344 cc $75
;
run;
ods listing close;
ods html file='c:\temp\crosstab.html' style=sasweb;
proc tabulate data=cust f=dollar6.;
title 'Proc Tabulate';
class cust_id acct hierarchy /order=data;
var amt;
table cust_id * acct,
hierarchy*amt=' ' all*amt=' ';
keylabel sum=' ';
run;
proc report data=cust nowd;
title 'Proc Report';
column cust_id show_cust acct amt,hierarchy amt=alltot;
define cust_id / order order=data noprint;
define show_cust / computed 'Cust/ID';
define acct / order order=data;
define amt / sum 'Hierarchy' f=dollar6.;
define hierarchy / across ' ' ;
define alltot / sum f=dollar6.;
compute before cust_id;
hold = cust_id;
endcomp;
compute show_cust ;
show_cust=hold;
endcomp;
run;
ods html close;
[/pre]