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.;
thanks for your immediate response. However, i can't ignore it as SAS stops running...
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?
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
Your program is generating unbalanced quotes. It looks like SAS it not really detecting that until you submit the next block of code.
How exactly do you start a new SAS session?
Did you only run the macro definition, or did you actually call the macro?
Is the definition properly terminated with a valid %MEND statement?
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.
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.
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.
options noquotelenmax ;
Try this option :
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.