EG 4.1 imports a MS Access table which has invalid column names, as an example
2009 subs total
Total # Of Subs
.... etc....
I look at the generated code by sas and it creates _T_ value to process the observations, and creates the SAS Dataset.
The strange thing is that SAS outputs the dataset with non-standard variable names, which causes me the problem.
I would have thought SAS would have kept the _T_ or someting like that...
I want to re-name all the variables to someting like:
Rename 2009 subs total = Y2009_Subs_Total;
But SAS looks at the 2009 as a numeric not as a variable name...
Any ideas on how I can take a variable named 2009 subs total and rename it to Y2009_Subs_Total?
TIA, Jay
State the variable name as a name literal in your rename statement. see:
You would have to have the validvarname=any option set as well
Ah, just figured it out the 'n option works, it takes the 'value of' the 'string' not the string... cool....
For SAS/EG system option validvarname= is set 'any' by default.
You should set it back at the first of your code . validvarname=v7.
Ksharp
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.