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...

 

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
_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.
The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
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.

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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