- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-02-2010 05:10 PM
(2206 views)
At one time I used to know a string of characters that you could submit that would match any unbalanced quotes and or comments in code that was submitted and needed the matching quote to stop running. It was something like */*'/*"/*/;run;
Does anyone know what it is? Thanks.
Does anyone know what it is? Thanks.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
The one I use is:
*'; *"; stop; run; quit; %mend;
which is a variation of the string recommended on page 15 of this document:
http://support.sas.com/publishing/pubcat/chaps/61025.pdf
I keep submitting it over and over until I see this message in the log, because, as it says on page 15:
"Depending on how deep a hole you have dug for yourself, you might need to run this line several times. You’ll know you’re done when you see an error message that says “No matching %MACRO statement for this %MEND statement.” The line works on unbalanced quotes because anything between an asterisk and the next semicolon is treated as a comment by SAS, unless there is an open quote, in which case it is just part of the quote. For example, *”; will close a double quote if one is open, but will not start a new quote."
cynthia
The one I use is:
*'; *"; stop; run; quit; %mend;
which is a variation of the string recommended on page 15 of this document:
http://support.sas.com/publishing/pubcat/chaps/61025.pdf
I keep submitting it over and over until I see this message in the log, because, as it says on page 15:
"Depending on how deep a hole you have dug for yourself, you might need to run this line several times. You’ll know you’re done when you see an error message that says “No matching %MACRO statement for this %MEND statement.” The line works on unbalanced quotes because anything between an asterisk and the next semicolon is treated as a comment by SAS, unless there is an open quote, in which case it is just part of the quote. For example, *”; will close a double quote if one is open, but will not start a new quote."
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! That's exactly what I was looking for, but better.