Hello, I've been trying to rename all the variables that start with a state, and end with something like !!Housholds!!Estimate and I keep getting the Error 20-200 saying:
"Alphabetic prefixes for enumerated variables (Alabama-Estimate) are different.
Old and new variable name specifications for RENAME must be of the same type. Statement is ignored.
And Error 22-322 says: Syntax error, expecting one of the following: -, :, =.
The symbol is not recognized and will be ignored.
I want to change all the variables to a shorted postal abbreviation of the corresponding state. For example I want the variable Alabama!!Housholds!!Estimate to be just AL.
Also, none of my data copied from the first data set to the second dataset, but I created that second dataset. The second dataset just has all of the original variables, but with no observations.
This one is the first dataset RegPro.IncoSt
This one is the second dataset RegPro.IncoSt1
A name with exclamation marks is a non-valid name, unless you have
options validvarname=any;
set. In which case you must use a name literal:
'Alabama!!Housholds!!Estimate'n
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.