Hi, I am reading the official SAS Specialist prep guide, on page 69, talking about error caused by unbalanced quotation marks, there is a tip saying
Both SAS Enterprise Guide and SAS Studio add a final line of code to stop unbalanced quotation marks.
What does that even mean?
I ran the code in SAS studio, nothing happened, no log or output.
is it something to do with the last paragraph saying that submitting a line so that I do not have to manually cancel in SAS studio or SAS EG compared to other SAS apps?
It's hidden behind a OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; statement.
To see it, go to (in SAS Studio) Settings and there to Code and Log. In this, you'll find Show Created Code in SAS Log (or similar, for me - German - it's "Generierten Code in SAS-Log anzeigen")
When you submit code in EG or Studio, look at the end of the log. You'll find a "magic string" which is meant to deal with missing semicolons, unbalanced quotes, unfinished comments, missing QUIT and RUN statements.
What it can't fix are incomplete macro definitions.
The string is (as @Kurt_Bremser wrote) at the end:
;*';*";*/;quit;run;
But unfortunately it does'nt fix unfinished macros.
Bart
I don't see no such code at the end of any of my logs
It's hidden behind a OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; statement.
To see it, go to (in SAS Studio) Settings and there to Code and Log. In this, you'll find Show Created Code in SAS Log (or similar, for me - German - it's "Generierten Code in SAS-Log anzeigen")
@Nietzsche wrote:
I don't see no such code at the end of any of my logs
Hello @Nietsche!
I see the following in my log:
70 data work.admitfee; 71 set cert.admit; 72 where actlevel='HIGH; 73 run; 74 75 proc print data=work.admitfee; 76 var id name actlevel fee; 77 run; 78 79 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 80 ODS HTML CLOSE; 81 &GRAPHTERM; ;*';*";*/;RUN; NOTE: There were 0 observations read from the data set CERT.ADMIT. WHERE 0 /* an obviously FALSE WHERE clause */ ; NOTE: The data set WORK.ADMITFEE has 0 observations and 9 variables.
Where line number 81 contains the added code as indicated by @yabwon and the Note contains that famous "warning".
You should actually see something similar.
Best
Fja
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.