BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I am using proc tabulate procedure with out option to create output data set.

My question is how to control the name of the columns in the output data set.(without using rename statement!!!)

for example:

Instead of names:

MSRP_Mean

MSRP_Max

MSRP_Min 

I want to have name:

x_avg

x_Max

x_Min 

proc tabulate data = sashelp.cars  out=bbb;
class origin;
var msrp;
table origin,
        msrp*mean msrp*max  msrp*min ;
run;

 

 

 

1 REPLY 1
SASKiwi
PROC Star

I don't see any other way of doing this inside TABULATE except using RENAME = like so:

out = bbb (rename = (CurrentName = NewName))

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 541 views
  • 0 likes
  • 2 in conversation