Here is a long way (it can be shorter, but this is easy to understand):
SSN="2c3456789"
FOR i=1 TO LEN(ALLTRIM(SSN))
IF !INLIST(SUBSTR(ALLTRIM(SSN),i,1),'1','2','3','4','5','6','7','8','9')
MESSAGEBOX('This record has the character of '+SUBSTR(ALLTRIM(SSN),i,1),16)
ELSE
?SUBSTR(ALLTRIM(SSN),i,1)
ENDIF
ENDFOR
>Some background: I have a table that is being generated on a daily basis. I need to run a few scans on the table to validate the data. One of the these checks involves making sure the social security numbers are ONLY numbers. If it does find a character in one of the fields, then I should get a message box alerting me of the error.
>
>For example, this is something along the lines of what I need to do.
>
>use export
>scan
> if (any digit of the ssn is not 1 - 9)
> wait window "SSN error" at 20,70
> endif
>ENDSCAN
>
>Any help would be appreciated.
>Thanks
>
>Ramone
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"