Date: Tue, 11 Feb 2003 08:10:11 -0500
Reply-To: diskin.dennis@KENDLE.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: diskin.dennis@KENDLE.COM
Subject: Re: How to count observation?
Content-type: text/plain; charset=us-ascii
Saqu,
Check out the view SASHELP.VTABLE. In there you will find libname, memname
and nobs for each member. Just select on the libname you want.
HTH,
Dennis Diskin
From: Saqi <saqi2000@TOTALISE.CO.UK>@LISTSERV.UGA.EDU> on 02/11/2003 07:53
AM
Please respond to Saqi <saqi2000@TOTALISE.CO.UK>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: How to count observation?
Hi their,
I have to count number of observations in each dataset in library called
departments. I need to count number of employee in each department. I have
got
this macro to do the job.
%macro dsnobs(dsn);
%global nobs;
%let nobs=;
data _null_;
if 0 then set &dsn nobs=count;
call symput('nobs', left(put(count, 8.)));
stop;
run;
%mend dsnobs;
but the problem is I have to run over library departments how would I do
that
so it goes and searches the department library and counts number of
observation in each data set and returns the name of the data set and
number
of observations.
Could anyone help please?
Many thanks
Tahir