If you have 5 variables, x1, x2, x3, x4, x5, and you want to change add "2002" to the first three variables, but let the other two unchanged. Then, you can use the following syntax:
-----------------------------------.
local ivlist x1 x2 x3
local n: word count `ivlist'
tokenize `ivlist'
forvalues i = 1/`n' {
rename ``i'' ``i''2002
}
.
-----------------------------------.