Date: Fri, 11 Feb 2005 15:07:47 -0500
Reply-To: Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject: Re: Proc options error handling
Content-Type: text/plain
Howard Schreier wrote (in part):
You could retrieve all of the names, using SASHELP.VMEMBER or
DICTIONARY.MEMBERS, then filter out the bad ones. I don't think there is a
function which validates SAS names, but it should not be too hard using
available functions or perhaps a regular expression.
<end quote>
Well, mainly since it's Friday afternoon, I decided to try and dig out
whether the plethora of new functions in SAS 9 might include one to check
names, or whether they had somehow missed adding that function-ality (pun
intentional).
Turns out that there is now a function, NVALID, that checks whether its
argument is a valid SAS variable name. (There's a second argument that lets
you specify the strictness of the variable naming rules, similar to
VALIDVARNAME.) I think this should pretty much be usable for table names as
well.
Happy weekend!
Mike Rhoads
Westat
RhoadsM1@Westat.com
|