BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Nietzsche
Lapis Lazuli | Level 10

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?

Nietzsche_0-1667629230309.png

 

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

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")

View solution in original post

6 REPLIES 6
Kurt_Bremser
Super User

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.

yabwon
Amethyst | Level 16

The string is (as @Kurt_Bremser wrote) at the end:

;*';*";*/;quit;run;

But unfortunately it does'nt fix unfinished macros.

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Nietzsche
Lapis Lazuli | Level 10

I don't see no such code at the end of any of my logs

SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
Kurt_Bremser
Super User

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
Lapis Lazuli | Level 10
ah yes I see it now. Didn't know how much code are actually hidden behind the scene!
SAS Base Programming (2022 Dec), Preparing for SAS Advanced Programming (Cancelled).
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10

@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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2065 views
  • 3 likes
  • 4 in conversation