Вы можете обернуть функции CHRTRAN и получить результат в одну строку кода. Например:
* This can contain numbers, characters, special characters, etc.
m.lcSource = "ABC.1def23-gHI45J!#6KL"
* This is what I want returned back to me. In this case, it's digits only.
m.lcReturnToMe = "0123456789"
* The inner CHRTRAN() function removes anything that is a number. The return value is
* what will be removed in the outer CHRTRAN function.
m.lcDigitsOnly = CHRTRAN(m.lcSource, CHRTRAN(m.lcSource, m.lcReturnToMe, SPACE(0)), SPACE(0))