BookmarkSubscribeRSS Feed
_zeta_
Fluorite | Level 6

Hi everyone!

Maybe exist a way to disable the autogenerated variables when a user executes a task in SAS Studio?

_zeta__0-1761579554635.png

 

We want to avoid this:

_zeta__1-1761579742932.png

 

We appreciate the support you can provide us!

 

 

 

7 REPLIES 7
Quentin
Super User

If you start a new session, and run a task, do you get that Note?

 

I tried to replicate the problem, but I couldn't, even with code like:

1    %let foo=%bquote(blah'AAA BBB CCC'blah)  ;
2    %put &foo ;
blah'AAA BBB CCC'blah

The only way I could get that NOTE in the log is if I introduce an unmatched quotation mark, as suggested in this thread:
https://communities.sas.com/t5/SAS-Programming/quot-NOTE-49-169-The-meaning-of-an-identifier-after-a...

 

_zeta_
Fluorite | Level 6

I was able to replicate the case, It works!

 

;*%mend;*);*';*";**/; 
run;

 Now, we want to replicate this for all users that use SAS Studio, I can't do that in workspace autoexec.sas code because It should be place at the beginning of the user's code, may be exist another place to do that?

SASKiwi
PROC Star

You can turn that note off by adding this option to your SAS server AUTOEXEC - this will enable it for all users:

options noquotelenmax;

 That's what we do and it works fine.

Quentin
Super User

I don't think noquotelenmax will effect the note about text immediately following a quoted string, e.g.:

 

1    options noquotelenmax;
2    %let foo='bar'foo ;
              -----
              49
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.
SASKiwi
PROC Star

True, but it isn't clear which issue the OP has: an embedded quote or simply a long end-quoted string - the option can deal with those.

Tom
Super User Tom
Super User

@_zeta_ wrote:

I was able to replicate the case, It works!

 

;*%mend;*);*';*";**/; 
run;

 Now, we want to replicate this for all users that use SAS Studio, I can't do that in workspace autoexec.sas code because It should be place at the beginning of the user's code, may be exist another place to do that?


You cannot fix user generated unbalanced quotes (or unbalanced macro defintions) in the autoexec.sas file.  The problem hasn't happened yet when the autoexec file executes.

Quentin
Super User

@_zeta_ wrote:

I was able to replicate the case, It works!

 

;*%mend;*);*';*";**/; 
run;

 Now, we want to replicate this for all users that use SAS Studio, I can't do that in workspace autoexec.sas code because It should be place at the beginning of the user's code, may be exist another place to do that?


I'm surprised Studio isn't already appending that magic string after each block of user submitted code.  That's what EG does.

 

Personally, I think automatically fixing unmatched quotes can be confusing to developers.  It can end up hiding the problem, because the IDE fixes it.

 

So I would recommend handling this as an education issue, and inform users that if if they receive the error you mentioned, they likely have a problem with unmatched quotes.  And they can either try submitting the magic string to fix the problem, or they can exit their SAS session and re-start it.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 7 replies
  • 207 views
  • 4 likes
  • 4 in conversation