I\'m doing the following the output the mean to a datset:
PROC UNIVARIATE DATA=have trimmed=0.05; VAR age; by sex; output out=outputstats mean=theMean; run; proc
ODS OUTPUT to the rescue. Use ODS TRACE ON; to find the name.
ODS OUTPUT
ODS TRACE ON;
proc sort data=sashelp.class out=have; by sex; run; ods trace on; PROC UNIVARIATE DATA=have trimmed=0.05; VAR age; by sex; ods output TrimmedMeans=trimmedMeans; run; ods trace off;