Date: Mon, 1 Sep 2008 14:50:03 GMT
Reply-To: Lou <lpogoda@VERIZON.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou <lpogoda@VERIZON.NET>
Subject: Re: Observations causing missing values
"Adam" <firstname.lastname@example.org> wrote in message
> Hi All,
> I'm using SAS9.1 (Windows) and have a long and complex program which
> works on a large dataset. Sometime I get the error:
> "Missing values were generated as a result of performing an operation
> on missing values."
> This tells me the line and position of the problem but it is quite
> tedious to try and find it - especially as my program is so large it
> doesn't all fit in the log window. Also it doesn't tell me which
> specific observations caused the problem. Is there any way to find
> (1) the name of the newly-missing variable(s) and
> (2) the observation number(s) effected?
It's not an error per se - SAS is designed to propagate missiing values in
this situation , but on the chance that this is a data problem, it puts the
message in the log.
The best solution is to code definsively. Instead of simply programming
A = B + C;
you write something like:
IF B > . AND C > . THEN A = B + C;
ELSE A = whatever you want A to be in this situation.
If B and C are never supposed to be missing, then you could have a screening
IF A = . OR B = . THEN OUTPUT FEE;
ELSE OUTPUT FIE;
A = B + C;