I currently am working to merge two data sets. They both have unique variable names except FamilyID which I'm using to match the data on. My two data sets are a parents data set and child data set that I wish to merge. I have successfully merged them but the value labels are wrong for the merged data set because the value label names are the same between the two data sets, but they indicate different values between them. For example, in parents data set the value label "labels8" hold information for race 1 "Black" 2 "Hispanic" etc and "labels8" in the child data is gender identity 1 "Male" 2 "Female" etc. when I merge the two data sets the value label for the child takes on the value label for the parents "labels8" since it holds the same name.

I would like to rename all my value labels in one of my data sets to add a prefix or suffix so that I do not have this problem when I merge. Incidentally all my value labels begins with "labels" followed by a number. I also have 516 value labels so I can't just go change them all easily.

Any help would be appreciated. This is my first post and I'm a newbie to STATA.
Thank you!