In reply to Seb.

Seb, you might pose this puzzle to one of the discussion forums in the SAS Support Communities. I'd bet that some SAS programmers there would happily take up the challenge, especially if you can provide some examples of valid and invalid numbers.