Ok, I didn't realise that. I suspect it will be a surprise to others...
If you are rejecting for nine (or more) numerics which are not bounded by alpha characters*, then
From character one, count all characters which have a value zero to nine. Restart counting from zero when you get an alpha. Stop when you reach end of data (after looking at 30 characters). Stop counting and reject if you get to nine.
Once you've rejected the ones you don't want, then you can do any other processing you like on the accepted ones.
You can test byte-by-byte for NUMERIC to count, and for ALPHABETIC to re-start the count. If there are other characters than ALPHABETIC which end your criteria, then you include those with the ALPHABETIC test.