BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
geneshackman
Pyrite | Level 9

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?

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

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.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

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.

geneshackman
Pyrite | Level 9

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.

ballardw
Super User

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1509 views
  • 1 like
  • 3 in conversation