Date: Wed, 2 Jun 1999 13:59:08 -0600
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: missing obs data sets question
Content-Type: text/plain; charset=US-ASCII
Yes, but keep in mind that there are circumstances under which NOBS will not return the actual number of observations in a dataset. It doesn't happen often, but it does happen. The main things to watch out for are views and datasets with deleted observations.
Development Manager, METRICS
First Health, West Sacramento, California USA
>>> "Newhouse, Russell" <Russell.Newhouse@WL.COM> 02Jun1999 12:42 PM >>>
One possible method could be to look at the DICTIONARY.TABLES table that SAS
creates. You can use a SQL query to look at the value of NOBS (number of
observations) for the appropriate MEMNAME (data set name).
Parke-Davis Pharmaceutical Research
2800 Plymouth Road
Ann Arbor, MI 48188
From: Doug Conrad [mailto:DConrad@HER-CHER.ORG]
Sent: Wednesday, June 02, 1999 3:53 PM
Subject: missing obs data sets question
I have a range of small data sets sequentially named line1--line25.
These are generally 1 line datasets that go into a proc report.
My problem: sometime zero obs will be returned in the datasets
thereby dropping them as a line item in the proc report. I want all lines
that have zero/missing to just produce a "0.00".
What I would like to do is go through a macro loop and check if each
dataset is empty, and if it is, then give it one observation that will
then produce a corresponding line in proc report.
%syserror doesn't look right. I've set the program up so that the files
'exist' but am not quite sure how to macro code this.