I get this error. I looked it up on the web and I'm not sure solutions on the web apply to my code
data temptotal;
set tempa tempb;
if county eq "New York State" then delete;
if race = "County Total" and county = "State Total" then delete;
if county eq "State Total" then county_code = 36000;
run;
here is the log
data temptotal;
1074 set tempa tempb;
1075 if county eq "New York State"
-------------------------
49
1075! then delete;
1076 if race = "County Total" and county = "State Total" then delete;
---------------- ----------------------------
49 49
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between a quoted string and the succeeding identifier is recommended.
1077 if county eq "State Total" then county_code = 36000;
1078 run;
running on sas 9.4, on windows.
I don't have any characters after quotes. As far as I can tell, the end of every quoted phrase is followed by a space.
Do i have an error in punctuation?
This is usually caused by an unbalanced quote further up your program. What you have posted is fine. Might be easier just to save the code you've posted, start a new SAS session then run your code again.
This is usually caused by an unbalanced quote further up your program. What you have posted is fine. Might be easier just to save the code you've posted, start a new SAS session then run your code again.
Thanks, that was it. I closed, and re-opened and re-ran, and it worked fine. I -did- have an earlier error with a quote, but i fixed it before i ran this. Anyway, when i closed this sas session, and re-opened and re-ran, no problem. Thanks again.
Please do not call this an error. As the log shows it is a NOTE.
The NOTE is saying that something has a character other than a space after a quote at the end of some expression. SAS uses quoted values followed by a letter to indicate special forms of literal values:
'17Jul2022'd <= a date literal value
"12:15:27"t <= a time literal value
"17Jul2022:12:15:27"dt <= a datetime literal value
and when the options Validvarname=ANY then a variable name literal such as 'variable with spaces'n to reference a variable with non-standard naming. Option Validmename=Extend will allow data sets to have non-standard characters such as "ds * spacenames"n.
The Note says that at some time the combination of characters that was found might become a special case such as these literals and the code might change behavior.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.