Does one of your variables not have a variable label? If so, that would generate an error in the loop. To debug your code add the following line of code to the loop above the rename command.
display "var=|`var'| new_name=|`new_name'|"
Does one of your variables not have a variable label? If so, that would generate an error in the loop. To debug your code add the following line of code to the loop above the rename command.
display "var=|`var'| new_name=|`new_name'|"