Date: Wed, 8 Dec 1999 01:17:46 GMT
Reply-To: Lou Pogoda <lpogoda@HOME.NOSPAM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou Pogoda <lpogoda@HOME.NOSPAM.COM>
Organization: @Home Network
Subject: Re: Need to detect empty file; How?
If you need a macro variable, the following code will set macro variable
"found" to 0 or 1, depending on whether the data set is empty or not empty
if howmany > 0 then found = 1;
else found = 0;
call symput('found', found);
set smallfile nobs = howmany;
If you need SCL, I don't have a manual at home, but take a look at ATTRN.
One of the attributes you can check for is the number of observations.
Robin baker wrote in message <firstname.lastname@example.org>...
>The simple code following can create an empty data set sometimes, I
>need to detect this and stop the next process.
> SET BIGFLE;
> WHERE SALRY > 10000;
>I know there is a simple method, but I am using SAS 6.12 and what I am
>doing is not working.
>Sample code would be appreciated.
>Base SAS or SCL method or both would be very nice.
>Thanks in advance.