BookmarkSubscribeRSS Feed
Toni2
Lapis Lazuli | Level 10

hi i get the below error and but i am not sure how i can fix it

 

Note : i have amended some elements - i hope does not cause confusion

 

  ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='1000 - sampling';
4          %LET _CLIENTPROCESSFLOWNAME='SAMPLING EXECUTING';
5          %LET _CLIENTPROJECTPATH='\\my_drive_location\03 Projects\2021 11 - File
5        ! 2\1Sampling Approach\Codes\Sampling.egp';
6          %LET _CLIENTPROJECTPATHHOST='***********';
7          %LET _CLIENTPROJECTNAME='Sampling.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=ACTIVEX;

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

13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HTMLBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
17             STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css"

___________________________________________________________________________________________                                         
                                                                                                             49
17       ! )
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.

18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
24         
25         GOPTIONS ACCESSIBLE;
26         %macro sample_calc(monthid);
27         %month_mvars(monthid=&monthid.);
28         
29         %put monthid:&monthid.;
30         %put monthid_yymm:&monthid_yymm.;
31         %put monthid_date9:&monthid_date9.;

 

13 REPLIES 13
Reeza
Super User
The error has nothing to do with your code, it has to do with the SAS code that runs at start up. You can ignore this message though it's annoying for sure.
Toni2
Lapis Lazuli | Level 10

thanks for your immediate response. However, i can't ignore it as SAS stops running...

Tom
Super User Tom
Super User

You appear to be using type of front end to SAS that is submitting that code.

What front end tool are you using?  SAS/Studio?  Enterprise Guide?  Something else?

 

What happens when you start a new SAS session? Do you still get the NOTE?  Or does it only appear after you have submitted some code?  Do you have an AUTOEXEC file you are using?  Is the code in that file valid?

Toni2
Lapis Lazuli | Level 10

i use Enterprise Guide. 


No, i just restarted SAS and run a different code with no errors at all

 

You are correct, this error only appears when i execute a specific macro

 

Yes, i use autoexec file which i guess its code is valid

Tom
Super User Tom
Super User

Your program is generating unbalanced quotes.  It looks like SAS it not really detecting that until you submit the next block of code.

Toni2
Lapis Lazuli | Level 10
it started doing the same when i opened a new SAS session (it did not do it before)
Toni2
Lapis Lazuli | Level 10
there are multiple macros which are called and executed. I checked all of them have %mend. Not sure how to locate the one which causes the issue here
Tom
Super User Tom
Super User

You should be able to tell where it has gotten off track because it should stop actually running the code you expect the macro to generate.

  • Look for places where it is putting text into macro variables from data.  That is the easiest way to get unquoted text into code.
  • Look for places where it is using unbalanced quotes in statement style comments.

This comment works in open code:

* Don't use unbalanced quotes in comments ;

But once you put that statement into a macro definition the macro processor now sees the beginning of a quoted string.  So something like this becomes gibberish.

%macro test;
* Don't use unbalanced quotes in comments ;
data test;
  name='Sam';
run;
%mend ;

Since the macro processor sees:

* Don
't use unbalanced quotes in comments ;data test;  name='
Sam
';run;%mend ;

With that last quoted string never ending.

Kurt_Bremser
Super User

Debug it step by step. Submit each macro definition separately, then call each macro separately, as it is called in your program. In between, submit something simple, like

proc print data=sashelp.class;
run;

and see when the problem starts to appear. This lets you narrow down the code where to look for a mistake.

Toni2
Lapis Lazuli | Level 10
tried but still get the same error

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 13 replies
  • 3888 views
  • 3 likes
  • 5 in conversation