Your log does NOT have the full set of SAS code that was submitted. What version of Enterprise Guide are you using? With version 6.1 you can change the settings by using menu Tools -> Options to see the options window. Then under Tasks -> Tasks General there is a check box for "Display all generated SAS code in task output". Check that Box and hopefully you will see the line of text that the SAS log says has happened on line 49.
I would side with answers that point to macro comments as the likely issue.
I had a [ %macro comment; ] statement followed by some unused code, having read here (http://www.sys-seminar.com/EE/Files/staceyphillips.pdf) that creating %macro comment and not calling the macro is a good way to comment out sections of code.
I used that approach, with a macro comment statement followed by some optional SAS code I did not intend to execute (that section included some regular commented out text, using * ... ; and /* ... */ methods).
The "NOTE 49-169" problem began immediately after running this macro-commented-out section. The only solution seemed to be restarting EG.
So, if you have any macro comment sections, or macros with comments in them, I suggest removing the macro comment and using some other method for commenting out that section of code, and/or experimenting with different types of comments within that macro to maybe pinpoint the problematic syntax.
p.s. A potentially better approach to using a macro for commenting out sections of SAS code is mentioned in this post, although I have not tested it (http://stackoverflow.com/questions/12011887/commenting-out-sections-of-code-for-testing).
I know this is a late reply but I recently had this problem and found my issue. I am using SAS EG and ran part of a macro but didn't run the %mend. I then went to run all of my code and got the "NOTE 49-169" issue. SAS doesn't fully dump it's memory so the unbalance of not having %mend creates the note/error. This is why closing the program and then opening and re-running the program "fixes" the problem. A quick solution is to only run the line "%mend" which will generate an error. Ignore the error. Then try re-running all of your code and there should be no issues.
Hello Paul_NYS,
The most common cause of this note is code that was submitted that contains unbalanced quotes. The circumvention is to add the missing quote and save your code. In Base SAS, you can try submitting the following line of syntax. Most of the time this statement will allow SAS to recover from the missing quote and you will not have to restart SAS.
;*%mend;*);*';*";**/;
run;
If the this does not allow SAS to recover, you will have to restart SAS.
If you are running in Enterprise Guide, the circumvention is the same. You will have to add the missing quote quote and save your code. However, EG automatically submits the above line of syntax that allows you to recover from the missing quote. Simply resubmitting your code should allow you continue in the current EG session. If you are still receiving the note even after correcting the unbalanced quotes, you will have to restart your EG session.
As some of the folks who responded have mentioned, unbalanced quotes within a comment within a macro definition can also generate this note. The note listed below goes into more detail, but basically, both asterisk-style and macro-style comments are still tokenized by SAS. This means that an unmatched quote within these styles of comments is still seen as the start of a string literal. SAS always expects a closing quote to end a string litteral.
http://support.sas.com/kb/32/684.html
The best way to prevent problems with unmatched quotes contained within comments is to always use PL/1 style comments within a macro. This type of comment is not tokenized so quotes are not seen as the start to a string literal.
If the cause of the note is a quote within a comment, the circumvention is to change the comment to a PL/1 style comment and save your code. You can then try and submit the following line of code to restore your SAS session. If that does not allow you to recover, you will have to restart your SAS session.
;*%mend;*);*';*";**/;
run;
The final common cause for this issue is a quoted string that contains a macro variable that was created using a macro quoting function. Below is a simple example. This problem is most likely to occur when the macro variable is the last thing listed in the quoted string.
%_eg_hidenotesandsource;
5 %_eg_hidenotesandsource;
29
30 %let x=%str(test);
31
32 %put "This is a &x"abc;
NOTE: Line generated by the macro variable "X".
32 "This is a test
_______________
49
"This is a test"abc
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.
Macro quoting functions use special delta characters to mask any special characters found within the argument to the function. These delta characters can sometimes be misinterpreted in non-macro code and cause unexpected problems. The circumvention is to use the %UNQUOTE function to remove the delta characters.
%put "This is a %unquote(&x)"abc;
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.