BookmarkSubscribeRSS Feed
CP2
Pyrite | Level 9 CP2
Pyrite | Level 9

I ran this code all day yesterday without an issue. Today it won't run and I am getting this error message. I've seen messages on SAS support related to this issue but they were from 2014 and a paper written in 2012 suggested adding an extra semi-colon which did not work. I am using SAS Base 9.4 and the path is a network path and is correctly written and the file exists (again, worked all day yesterday). Does anyone know why this could be happening with SAS 9.4. None of my %put statements are resolving either. It seems like SAS is just malfunctioning its macro utility.

 

4663 %include "&path.Plot Workbook.sas" ;
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.
4664 %include "&path.Plot Workbook.sas" ;;
ERROR: Incorrect %INCLUDE statement will not be executed. There is a syntax error.

4 REPLIES 4
Kurt_Bremser
Super User

Use the {i} icon to copy/paste log snippets to. Only then can we be sure we get all text exactly as it was written to the log by SAS.

The main posting window will drop or change certain characters.

You might als post the code as you ran it, the log might not have all relevant text in it.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Its likely you have submitted code which is incorrect, and has not been terminated.  By this I mean code you have submitted is still in effect.  For instance, if you submit code with only one quote mark, and don't close the quote mark, the quote mark from before is still in effect.  This can happen when you macros do no resolve to valid code, or leave text strings unclosed etc.  The simplest way to solve this is to start a new session.  Then QC the code you are running thoroughly (you will have a QC process won't you!), you will likely find some code being generated incorrectly or not as expected, and that is hanging on after the run has finished.

Tom
Super User Tom
Super User

Check out this other thread

https://communities.sas.com/t5/Base-SAS-Programming/resolve-macro-variable-in-include-statement/td-p...

 

It looks like you can get that error message when the filename you are trying to include is not in a valid format for the operating system you are using.

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
  • 4369 views
  • 0 likes
  • 4 in conversation