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

I'm trying to change the label of a variable. But the option is not working. In the log it is showing modification is successful. But the label for the variable is still blank. 

 

When I use other options like rename, it is working fine and the variable name is being changed.

 

Following is the below code, where I'm facing the issue.

 

data cls2;
    	set sashelp.class;
    run;
    
    proc datasets;
    	modify cls2;
    		rename name = t;
    		label  t = 'test'
    			   sex = 'test2'
    			   ;
    			   
    quit;

 

Following is the log for the above code

 

log_proc_datasets_issue.PNG

 

The output is

 

output.PNG

 

Could you please help me, where I'm getting the code wrong

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
Reeza
Super User

Post the output from the suggested code on SO.

dastan
Fluorite | Level 6

Hi Reeza,

 

I've updated the post with the output.

Reeza
Super User

That's not the output from the code. 

 

dastan
Fluorite | Level 6

thats the cls2 dataset modified after the proc datasets procedure is run.

Reeza
Super User

Ok then. The code has no issues, your log has no issues. 

You're doing something wrong and unless you post the full log from the code I *had* posted on SO we can't tell you anything else.

Notice that that's the same response you're getting on SO. 

 

Good Luck. 

 

 

Reeza
Super User

Check your options, there's a label/nolabel option that could be set on your server.

 

http://support.sas.com/documentation/cdl/en/lesysoptsref/69799/HTML/default/viewer.htm#p02de158iswt9...

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6 replies
  • 1994 views
  • 0 likes
  • 2 in conversation