Long ago someone on this list mentioned this guy:
options dsoptions="note2err" ;
Not sure what-all it does (where is this documented?), but it definitely produces ERRORs for undeclared variables. I think it does likewise with type coercion, but am not sure. It's in my new-sas-program header template...
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Marc Weinmann
Sent: Tuesday, December 16, 2008 11:56 AM
Subject: Enforcing good practices (e.g. variable declaration)?
Hi All - I have a simple question I've never seen answered for SAS.
Many programming languages have options to force strict variable declaration and flag accidental type-o's more quickly, such as a
variable used in only one spot of a program. In VB you have "Option
Explicit" or in perl there is "use strict" or "use warnings". Are
there any comparable options for SAS programs?