08-25-2013 11:39 AM
I have been running SAS programs using the same directory for a year now. I have been working on a program that has been running fine (minus usual de-bugging issues). However today, when I am trying to run the same program in the same directory, I am getting the below error (in bold). I have changed nothing to prompt it.
Does anyone know how to resolve this? I looked at some past older threads and did not see anything that I could use.
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='test_metric1_judge_8_22_13_test';
4 %LET _CLIENTPROJECTPATH='F:\MetricFiles\2013_Changes\test_judgeData_8_6_13.egp';
5 %LET _CLIENTPROJECTNAME='test_judgeData_8_6_13.egp';
6 %LET _SASPROGRAMFILE='I:\CIP_projects\data-metrics\SAS\2013JudgeData\test_metric1_judge_8_22_13_test.sas';
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.
12-09-2016 02:57 PM
The most common cause of this note is code that was submitted that contains unbalanced quotes. The circumvention is to add the missing quote and save your code. In Base SAS, you can try submitting the following line of syntax. Most of the time this statement will allow SAS to recover from the missing quote and you will not have to restart SAS.
If the this does not allow SAS to recover, you will have to restart SAS.
If you are running in Enterprise Guide, the circumvention is the same. You will have to add the missing quote quote and save your code. However, EG automatically submits the above line of syntax that allows you to recover from the missing quote. Simply resubmitting your code should allow you continue in the current EG session. If you are still receiving the note even after correcting the unbalanced quotes, you will have to restart your EG session.
As some of the folks who responded have mentioned, unbalanced quotes within a comment within a macro definition can also generate this note. The note listed below goes into more detail, but basically, both asterisk-style and macro-style comments are still tokenized by SAS. This means that an unmatched quote within these styles of comments is still seen as the start of a string literal. SAS always expects a closing quote to end a string litteral.
The best way to prevent problems with unmatched quotes contained within comments is to always use PL/1 style comments within a macro. This type of comment is not tokenized so quotes are not seen as the start to a string literal.
If the cause of the note is a quote within a comment, the circumvention is to change the comment to a PL/1 style comment and save your code. You can then try and submit the following line of code to restore your SAS session. If that does not allow you to recover, you will have to restart your SAS session.
The final common cause for this issue is a quoted string that contains a macro variable that was created using a macro quoting function. Below is a simple example. This problem is most likely to occur when the macro variable is the last thing listed in the quoted string.
30 %let x=%str(test);
32 %put "This is a &x"abc;
NOTE: Line generated by the macro variable "X".
32 "This is a test
"This is a test"abc
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.
Macro quoting functions use special delta characters to mask any special characters found within the argument to the function. These delta characters can sometimes be misinterpreted in non-macro code and cause unexpected problems. The circumvention is to use the %UNQUOTE function to remove the delta characters.
%put "This is a %unquote(&x)"abc;
08-25-2013 12:25 PM
Looks like unbalanced quotes. Did you change the AUTOEXEC? Or issue some commands using -INITSTMT configuration option?
08-25-2013 01:32 PM
It is a note as it is no error yet. As you are running eguide to a 9 version of SAS while it shows normal generated code this note is strange.
In the shown code the issue is not visible but possible it is coming from elsewhere. Try a dummy empty file as sas source to eliminate this option.
There has been a code convention change in the 8 to 9 conversion or even earlier.
The introduce named literal string is indidcating for more strict syntax coding conventions.
In the old day-s being limited by 72 postions on a punch card it made sense to save space. That is history.
SAS(R) 9.4 Language Reference: Concepts ( SAS Constants in Expressions - Avoiding a Common Error with Constants)
08-25-2013 02:02 PM
I actually can't even create a dummy file--I keep getting the same warning, which stops processing.
Here is the entire log file (not that long): http://www.nycourts.gov/surveys/cwcip/log-8-25-13.zip
08-25-2013 02:33 PM
SAS supports a few cases where a letter immediately following a closed quote changes the meaning of the string. For example:
'some long name'n
It looks like your first line is unbalancing the quotes, so that SAS considers all your open quotes to be closing quotes. Try starting a fresh SAS session and removing the first line.
08-25-2013 03:15 PM
The first lines in the program are generated by Enterprise Guide automatically. My first code lines in the program are just libref statements:
libname Raw 'F:\MetricFiles\7_2013_judge\Combine';
libname Dict 'F:\MetricFiles\7_2013_judge\Dictionaries';
libname SASd 'F:\MetricFiles\7_2013_judge\SASdata';
libname met 'F:\MetricFiles\7_2013_judge\metrics_final';
08-25-2013 03:27 PM
Just a a few diagnostic tests to try out ... not a solution ...
1. Does the NOTE disappear if you insert a blank after each of the open quotes?
2. If you remove all of the quotes that you have control over, are you able to run code subsequent to that?
You would need to start a separate EG session for each test.
08-25-2013 03:54 PM
Agree with diagnostic testing.
1/ create new eg.project (testinfra.egp) with the sas program contents: Proc options ; run;
Close the appserver and run this program. It should open up the appserver (WS) again.
a/ The error is still there? Your infra appserver got courrupted. Tom-s suggestions are good candidates to start.
b/ No error? The problem is somewhere in your own code. Try to submit step for step your code to get it to the point it will give problems
Disconnectin/restarting the WS server is needed as Asounding stated
In the EG-code line 1-6 is genereated and line 1 is the "magic string" that should elminate this kind of quoting problems.
I know one exception and that is some weird behanvior caused by using macro comment statements (%* )
08-26-2013 09:27 AM
Hi Astounding, Jaap
Based on the above, I created a new project and imported the same SAS program into it initially ran it as is without touching the quotes. It seemed to run fine actually. I don't know if it will last, but it seems to working OK within the new project, which I don't understand, since nothing else is different, but I will keep working with it today and replay back with the result.
06-27-2016 10:12 AM
Whenever i am getting this note i close the sas session and the reopen.Then there will be no more notes and truncation!But i am really interested in knowing the root cause,is it a bug.
07-03-2015 11:00 PM
It seems that quote problem.
Not sure . If it could work .
%LET _CLIENTTASKLABEL=%str( %'test_metric1_judge_8_22_13_test%' );
08-21-2015 06:01 PM
This is always a tricky problem, specially when it gets thrown for something that you were running successfully until recently. And there doesn't seem to be any simple one-step solution for it. Most searches online ended up in dead-ends for me.
So are few solutions which did or did not work for me:
1) a single or double quote used in a comment inside the Macro - even though its inside a comment, it somehow manages to trigger this warning
2) adding extra space before & after, each instance of single/double quote - this never helped (though it did make me search and understand the difference between using single vs double quote)
3) Using 'PUTN' function - this one was most recent. So maybe there are others functions too, which throw this warning!!
My suggestion would be, try commenting your code piece-by-piece and then running it after restarting SAS). Or in case you made any recent changes, start with them first.
Need further help from the community? Please ask a new question.