BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Biniie
Fluorite | Level 6

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? 

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

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

View solution in original post

3 REPLIES 3
novinosrin
Tourmaline | Level 20

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

Biniie
Fluorite | Level 6

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 🙂  

 

novinosrin
Tourmaline | Level 20

Glad, that was the problem. Have fun! 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 433 views
  • 0 likes
  • 2 in conversation