Hello,
I'm running someone else's code, which includes a macro that passes through sql to a sql server. They're setting up the query using %str and double single quoting all text and dates, then the macro %bquote's it all and creates valid sql code. However SAS prefers us to put spaces before an after quotes. Which would invalidate the sql code. So my log is littered with the following errors/warnings. Everyone else seems fine with this as it still works.
I can re-write to not use %bquote and use proc sql; with connection to sql_server. However I do not want to re-write someone elses code that uses this method for dozens of sql queries.
Is there a way to suppress this message? It will clean up my log and also when the code is in EG, the process flow will not have red x's next to every sas script.
Thanks
Rhys
62 ''08/04/2017''
__
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.
That note actually says that your code isn't future proof. So you really consider fixing the program.
It sounds like you have this in many places, so perhaps you could make this more component based and just have this logic in one place (a separate macro).
The only way to fix this is with NONOTES, but then you might loose some valuable information in the log.
First, that is not an error only a NOTE: Errors would halt a datastep or procedure.
There may be work arounds but you haven't shown any code that would actually CAUSE that note. Your example does not show any identifier after the quoted string.
It may help to post the data step or procedure from the Log with the message(s) and paste into a code box openend using the {i} icon on menu bar in the forum. The code box will preserve the format of the code and error message. That _ is import in showing where SAS thinks the issue occurs but the forum boxes remove formatting unless using a code box.
It may help to run the code with Options MPRINT if you have macros as sometimes the actual issue is hidden by the macro processor.
Thanks for the reply,
I say error as it shows up as red in the log. I understand the actual issue, it's do with passing macro variables within a %str to a macro which uses %bquote. The date is the identifier, which is surrounded by double single quotes, not a double quote.
I do not want to change any of the code, except for maybe adding an options statement like
options NONOTES=49;
That note actually says that your code isn't future proof. So you really consider fixing the program.
It sounds like you have this in many places, so perhaps you could make this more component based and just have this logic in one place (a separate macro).
The only way to fix this is with NONOTES, but then you might loose some valuable information in the log.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: