If you want to remerge the aggregate function results then you will have to add the code to do it yourself.
So instead of doing code like this that works in PROC SQL:
select *,mean(age) as gender_mean_age
from sashelp.class
group by sex
;
You will need to do something like
select a.*,b.gender_mean_age
from sashelp.class a
inner join
(select age,mean(age) as gender_mean_age
from sashelp.class group by sex
) b
on a.sex=b.sex
;