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

When I run the following code. The column name of the "name" variable displays as "NAME OF FORMER VARIABLE". I would like to keep the name as it is in the data table. 

 

proc report data=have;
column  _All_ ;
define Name / display ;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
It's likely showing the label not name. You likely changed the name but not the label somewhere. I'd back up to that step and ensure the label was also updated or explicitly specify the label you want in PROC REPORT.

View solution in original post

4 REPLIES 4
Reeza
Super User
It's likely showing the label not name. You likely changed the name but not the label somewhere. I'd back up to that step and ensure the label was also updated or explicitly specify the label you want in PROC REPORT.
Barkat
Pyrite | Level 9
Thanks.
I should have tried what you suggested, before I had asked the question. 🙂

The following code worked.

proc report data=have;
column _All_ ;
define Name / display "Name" ;
run;
PaigeMiller
Diamond | Level 26
proc report data=have;
    column  _All_ ;
    define Name / display "Gorillas" ;
run;

This makes the column for variable NAME to appear with the label "Gorillas".

 

PS @Barkat please enclose any SAS code you might want to show us in a code box. Click on the "little running man" icon and paste your code into that box. We're trying to help you, from now on, its also necessary that you help us.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 817 views
  • 1 like
  • 3 in conversation