On Mon, 16 Oct 2000 16:19:49 GMT, Brian Shore <bgs50@HOTMAIL.COM> wrote:
>Is there a way in SAS to determine if a character variable contains all
>alphabetic data? For example, I read a var called ACCOUNT and I want to
>know if the account number contains all alphabetic data. In some languages
>(C, SQL?), there is a function called ISALPHA() that does this, but I don't
>know of any such function in SAS.
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>Share information about yourself, create your own public profile at
In SAS you can use the verify function for that:
This is much more flexible, because you can use your own definition, what
is "alpha" (is $ alpha or not?). The second string contains all chars which
you will allow. If you have a char in a which is not in the string, you
will get the position of the unallowed char in a, or lets say "true". So
you can use:
if not verify ...
verify returns "false" if the string only contains allowed chars.