the below piece of code and it worked:
Doubtful.
I have not actually tried it, but:
1. I question the use of INP.0 in the fifth line. it should be INP.I
2. You probably lose stuff that is at the right of the change text. Rather than POS and LEFT, you should use PARSE to get both the leading text and the trailing text.
3. your code is not complete... I will assume you get out of the DO WHILE somehow.