I have a simple dataset with two variable called "cc" and "ss", and I want to rename them using a datastep like the following:
data new_data;
set old_data;
rename cc=vcc ss=vss;
run;
After the datastep, I run a proc contents to see that the variable names are change correctly - which they are. But if I then afterwards opens the actual new dataset, where the new variable name should be assigned, then I can't see the newly assigned names - like nothing have happend at all.
Does anyone know, why this happens and how I can fix it?
HI @Biniie One possibility is that it may display labels if permanent labels are associated with variable names. Did you check that in proc contents by any chance as well?
Please post the proc contents output if you can. Thank you!
Other possibility though may sound silly, you might be opening the old_data
HI @Biniie One possibility is that it may display labels if permanent labels are associated with variable names. Did you check that in proc contents by any chance as well?
Please post the proc contents output if you can. Thank you!
Other possibility though may sound silly, you might be opening the old_data
Hi @novinosrin.
Of course!! It did show the variabels labels (which was identical with the old-names") instead of the variables names.
Thanks for solving my mysterie 🙂
Glad, that was the problem. Have fun! 🙂
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.