BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rhys
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
LinusH
Tourmaline | Level 20

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.

Data never sleeps

View solution in original post

4 REPLIES 4
ballardw
Super User

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.

Rhys
Obsidian | Level 7

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;

 

 

 

LinusH
Tourmaline | Level 20

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.

Data never sleeps
Rhys
Obsidian | Level 7
Thanks, I thought as much, I just wanted to check to see if there was anything obscure I didn't know about.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 5081 views
  • 0 likes
  • 3 in conversation