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

Dear all,

 

I have a program which outputs a column name " Dummy 1" -> there is a space between dummy and 1....this makes the processing of the data really difficult. (please also see the screen shot)

 

the program is 

 

proc varmax data=pData;

     model p1 p2 / p=1 print=(estimates)

           ecm=(rank=1 ectrend normalize=p1) lagmax=0;

     ods output      AlphaInECM=AlphaInECM ;

     run;

 

what is an easy way to convert the column name from "Dummy 1 " to Dummy1 or something usable

 

thanks in advance

Sony


Dummy 1.png
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

I have never seen a variable produced by a procedure that got such a name. Are you sure that you are looking at the variable name and not it's label?

 

Otherwise, 

 

data want;

set have;

rename 'Dummy 1'n=Dummy1;

run;

 

will do the name change.

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

I have never seen a variable produced by a procedure that got such a name. Are you sure that you are looking at the variable name and not it's label?

 

Otherwise, 

 

data want;

set have;

rename 'Dummy 1'n=Dummy1;

run;

 

will do the name change.

PG

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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