hello every one,
is it possible to Apply proc summary or proc means or proc univariate on a whole Library, like :
proc summary data=libref._ALL_ ;
var _NUMERIC_;
quit;
i have been trying that but it is not working.
Thank you for the help
In my experience, computing summary statistics on a huge number of variables is of very limited usefulness, and not worth the time to do it. So I don't do this any more.
Nevertheless, if you are going to do this, I think it would make more sense to save the output in a SAS data set, in which you could actually search, and later analyze, rather than a huge number of HTML outputs as in the method from @ed_sas_member .
Two questions:
Why do you want to do this?
How many data sets are we talking?
Hi @aloou ,
Maybe this is something you can try :
%macro stat_lib (lib);
proc contents data=&lib.._all_ noprint out=work.lib_list;
run;
proc sort data=work.lib_list (keep= memname type where=(type=1)) nodupkey;
by memname;
run;
data _null_;
set lib_list;
call symput("memname"||left(_n_),memname);
call symput("nbdatasets",_n_);
run;
%do i=1 %to &nbdatasets;
title "Summary statistics of dataset &lib..&&memname&i";
proc means data=&lib..&&memname&i;
var _numeric_;
run;
title;
%end;
%mend;
%stat_lib(<your library>);
(code not tested)
In my experience, computing summary statistics on a huge number of variables is of very limited usefulness, and not worth the time to do it. So I don't do this any more.
Nevertheless, if you are going to do this, I think it would make more sense to save the output in a SAS data set, in which you could actually search, and later analyze, rather than a huge number of HTML outputs as in the method from @ed_sas_member .
It's not possible to do this easily in one step and I likely wouldn't recommend it anyways.
You can automate it quite easily though, will the data sets have anything in common or are they all entirely different?
@aloou wrote:
hello every one,
is it possible to Apply proc summary or proc means or proc univariate on a whole Library, like :
proc summary data=libref._ALL_ ;
var _NUMERIC_;
quit;
i have been trying that but it is not working.
Thank you for the help
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.