Date: Tue, 14 Sep 2010 13:22:49 -0700
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Uninitialized as error, and error as abort
Content-Type: text/plain; charset=ISO-8859-1
Take a look at:
It describes an undocument option that appears to be exactly what you
are looking for, namely NOTE2ERR.
On Sep 13, 3:42 pm, "Andrew Z." <ahz...@gmail.com> wrote:
> On Sep 13, 12:39 pm, Reeza <fkhurs...@hotmail.com> wrote:
> > On Sep 13, 11:07 am, "Andrew Z." <ahz...@gmail.com> wrote:
> > > Is there a way to make SAS version 9.x treat uninitialized variables
> > > as errors, and to stop all statements if there is any one error (or
> > > any kind)?
> > How do you define uninitialized?
> > Does this mean you're never creating any new variables only moving
> > things around?
> > It seems to me at some point all variables would be uninitialized, but
> > perhaps I'm not understanding what you're doing.
> I mean referencing or reading (compared to assigning) a non-existent
> variable in a data step like this
> 12 data zip;
> 13 set sashelp.zipcode;
> 14 if statcode eq 'NY'; /* typo of statecode */
> 15 run;
> NOTE: Variable statcode is uninitialized.
> SAS gives a NOTE, but I would rather have an ERROR instead.