LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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?
Comments: To: Saqi <saqi2000@TOTALISE.CO.UK>
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


Back to: Top of message | Previous page | Main SAS-L page