Please clarify your question. Have you imported an Excel sheet into a SAS dataset and want to calculate the mean age across all rows? Or are you trying to do something else?
Assigning the mean age to another variable is preferable:
proc sql;
create table want as
select *
,mean(age) as mean_age
from have
;
quit;
Ready to join fellow brilliant minds for the SAS Hackathon?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.