I get this error saying I am missing quotes but I don't see where. I also get this note to add white space. I am not sure where to add it.
I am using SAS Enterprise Guide 7.1 64 bit
The file still gets created with the correct date stamp.
%LET TODAY = %SYSFUNC(TODAY(),DATE7.);
proc printto log= "\\Testserver\Test\MyFile_&TODAY..txt";
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.
ERROR 23-2: Invalid option name 24.
ERROR 23-2: Invalid option name OCT2018.
You likely need to show more of what is going on.
Best would be to set OPTION MPRINT so macro code is expanded and the generated text involving the macro variables is resolved and shown in place.
The NOTE indicates that somewhere in the code you are generating something like:
"quoted string"and
the lack of space between the " and the word "and" above triggers the note. Since there is nothing like that in shown code it may be happening later in the program.
Show the entire log including the proc statements and options down through the error messages. Paste the copied text into a code box opened using the forum's {I} menu icon to preserve formatting of the error messages. Often there are indicator characters in the log to go along with errors and the main message windows here will reformat the result moving the indicators.
This error is the bane of SAS users. The error could be anywhere in the program. It could even no longer exist in the program and be a remnant of previous runs.
Sadly, there is still no way to tell SAS "reset all quotes, parentheses, macros and statements please".
From the message, it look like your OPTIONS statement is not closed, so maybe look there?
This is the line I run when I get in that state.
*))))))))))))))))))))))))))))))))))));*';*";*/;quit;run;%mend;
Run it a few times and hopefully you'll get this error message:
ERROR: No matching %MACRO statement for this %MEND statement.
When that's the case your SAS session should be back on its feet.
This:
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.
is a clear indicator of unbalanced quotes somewhere further up in the code. The following ERRORs are a consequence of this.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.