Dear colleagues,:

I have to work with a database that contains codes that I would like to codify. In order to do that I would like to substituite the certain values inside the variable.

For example:

AD00053
zoC0151

I would like to add at the beginning the characters CL1 and afterwards substitute the letter A for 1 D for 4 and then then the numbers by order per oder numbers. This should be done with a loop, since I need to do it over and over all the observations (+200.000)

Thank you very much for your help