Nick,
FWIW, Those two commands can be put into a single CHRTRAN. It would speed things up a little.
this.InputMask = chrtran( this.InputMask, ", ", "" )
> this.InputMask = STRTRAN(this.InputMask,",","")
> this.InputMask = STRTRAN(this.InputMask," ","")