- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 .
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Two questions:
Why do you want to do this?
How many data sets are we talking?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 .
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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