Change variable name

Reply
New Contributor
Posts: 2

Change variable name

Hi,

I have used proc import to import an excel file, and now I'd like to change one of the variable names. Is this possible, and if so, how?

Thanks!

Super User
Posts: 11,141

Re: Change variable name

Many ways. If this only needs to be done once then open the column view in the SAS explorer for the dataset, highlight and rename.

If you may need to do this more than once then PROC Datasets is a good choice for modifying existing data sets.

proc datasets nodetails library=<library name the dataset is in>;

Change oldname=newname;

quit;

Ask a Question
Discussion stats
  • 1 reply
  • 142 views
  • 0 likes
  • 2 in conversation