I’ve concatenated four years of survey data (2013-2016). Most of the variables in each year are the same, but the use of capitalization in the variable names differs in a way that causes problems.

For example, if I do a tabulation of “land_use”, I get results for survey years 2013-2015, but nothing for 2016. The problem is that the variable is named “LAND_USE” in the 2016 data. So if I do a tabulation of “LAND_USE”, I get results for 2016, but nothing for the 2013-2015 data years.

I was hoping that the “rename” command with the “lower” option would be a quick and easy way to put everything in lower case, but here’s the error message I got:
rename _all, lower

563 new names specified repeatedly in newnames
For instance, you requested the name age5p_african_acs_10_14 be assigned to 2 existing variables: age5p_african_acs_10_14
and Age5p_African_ACS_10_14.
r(198);
Stata isn’t letting me rename “LAND_USE” to “land_use” because a variable called “land_use” already exists. Silly me, I thought the “force” option would help but the error message is the same:
rename _all, lower force
563 new names specified repeatedly in newnames
For instance, you requested the name age5p_african_acs_10_14 be assigned to 2 existing variables: age5p_african_acs_10_14
and Age5p_African_ACS_10_14.
If anyone has a suggestion, I’d be grateful.