Hello
There is a data set in work library.
I am trying to run a simple query and get error 49.
I opened SAS again but nothing help.
May anyone help to understand what is going on and what action should be done to solve the issue?
11 ODS _ALL_ CLOSE;
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
__
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.
First thing, that is NOT and error, it is a Note.
For some reason SAS thinks there is a character other than a space between the ending quote and the semicolon. I don't see it, I can't generated that note using your code copied and pasted into my editor so I suspect that your code file may have a non-printable character of some sort that the forum software strips or ignores. I would suggest in your source code that you try deleting the characters after the second quote and retyping.
The note related to use of 'text' followed by another character(s) to indicate special treatment of the text. 'stupid-varname'n for name literals, '01JAN2022'd for date literals, '08:15:00't for time literals and/or '01Jan2022:08:15:00'dt for datetime literal values.
Thanks,
I run a very simple query and I didnt write any quote in the code as you wrote.
I don't see the wanted data set qqq because of error 49.
Data qqq; set r_r.L9; Run;
The error is
1 The SAS System 11:47 Wednesday, July 27, 2022
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
_________________________________
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 FILENAME EGHTML TEMP;
14 ODS HTML(ID=EGHTML) FILE=EGHTML
15 ENCODING='utf-8'
16 STYLE=HTMLBlue
17 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
18 NOGTITLE
19 NOGFOOTNOTE
20 GPATH=&sasworklocation
21 ;
NOTE: Line generated by the macro variable "SASWORKLOCATION".
21 ") NOGTITLE NOGFOOTNOTE
21 ! GPATH="/usr/local/saswork/SAS_work509E00000D90_LINX107717A15/SAS_workA43500000D90_LINX107717A15/"
_
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.
22 FILENAME EGSR TEMP;
23 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
24 STYLE=HTMLBlue
25 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
26 NOGTITLE
27 NOGFOOTNOTE
28 GPATH=&sasworklocation
29 ENCODING=UTF8
NOTE: Line generated by the macro variable "SASWORKLOCATION".
29 ") NOGTITLE NOGFOOTNOTE
29 ! GPATH="/usr/local/saswork/SAS_work509E00000D90_LINX107717A15/SAS_workA43500000D90_LINX107717A15/"
_____________________________________
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.
30 options(rolap="on")
31 ;
32
33 Data qqq;
34 set r_r.L9;
35 Run;
36
37 %LET _CLIENTTASKLABEL=;
2 The SAS System 11:47 Wednesday, July 27, 2022
38 %LET _CLIENTPROCESSFLOWNAME=;
39 %LET _CLIENTPROJECTPATH=;
40 %LET _CLIENTPROJECTPATHHOST=;
41 %LET _CLIENTPROJECTNAME=;
42 %LET _SASPROGRAMFILE=;
43 %LET _SASPROGRAMFILEHOST=;
44
45 ;*';*";*/;quit;run;
46 ODS _ALL_ CLOSE;
47
48
49 QUIT; RUN;
50
Have you restarted your SAS session? If not do so.
I found the source for error but I really can't understand it.
The problem was that there was extra ( in the code:
%step3(sourcetbl=Cars_To_Check_Cons_New, OfferField=offer_CARLOAN , productId=(('CP','NC' ,'AP'),t=10);
Surprisingly this code run well and I didn't get any error and the data sets were created well.
But after run this macro I run another short query that work on one of the data sets that were created in the macro and I saw error 49.
May anyone explain what happened?
Brackets operate in pairs. You have an opening bracket and no closing bracket, so the call of macro STEP3 is not correctly defined or ended. Hence following statements will get scrambled as well.
@Ronein The main learning experience from this really must be that you ALWAYS need to create a new SAS session if you get such errors, warnings, notes etc. - especially if they occur at the very beginning.
Make it a habit that when you encounter an error that's not obvious to always first re-run in a new session before spending time investigating what could be caused by a leftover from an earlier run in an existing session.
The error means that there is an unclosed quote. When you use proc sql to enclose codes in quotes and separate them by commas, you have to hard code the first quote for the first code and the last quote for the last code, like this:
proc sql;
select codes into:code_name separated by '", "'
from table;quit;
%put ("&code_names");
I always mess this up too.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.