LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page