BookmarkSubscribeRSS Feed
sutzig
Calcite | Level 5

Is there something going on with SAS OnDemand today? When running a script on SAS OnDemand for Academics which I've successfully run several times before, I am not getting any results, but am instead presented with a long log file which essential re-states by script prepended with 70 lines that start

 

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 2          TITLE;
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 6          RUN;

When I try to run a simple import

FILENAME REFFILE '/home/u50257852/FSS_Dashboard/Import/FHC_OCHIN_Screening_and_Follow_Up.xlsx';

PROC IMPORT DATAFILE=REFFILE
	DBMS=XLSX
	OUT=WORK.EPIC_OCHIN_Import;
	GETNAMES=YES;
RUN;

I'm again presented with a long log which begins: "

 NOTE: The quoted string currently being processed has become more than 262 bytes long.  You might have unbalanced quotation marks.
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 2          TITLE;
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 592        &GRAPHTERM; ;*';*";*/;RUN;QUIT;
                          _________________
                          49

 If I enter nonsense 

proc sql;
	select * from table; quit;

I get exactly the same response.

10 REPLIES 10
tomrvincent
Rhodochrosite | Level 12
SAS has had this bug for years and have never been fixed. Look at 'related topics' for more info.
sutzig
Calcite | Level 5

Thank, tomrvincent. I did look at the related topics and didn't find anything helpful. Most referred to macros which neither my initial file nor the test files include.

tomrvincent
Rhodochrosite | Level 12
Simply stated, you probably have a quote that isn't ended. Even if you fix it, you have to save your project and restart SAS. I've been complaining about this for at least 10 years and nobody at SAS cares about fixing it. It is VERY irritating.
sutzig
Calcite | Level 5

It is very irritating. Thank you for your guidance. I didn't find a quote that wasn't closed, but, after restarting, I copied my code into a new file piece-by-piece and tested it along the way.

 

The only cause I can possibly identify is that I had a series of %web_drop_table statements at the head of the script. Maybe that's what cause SAS to choke with a meaningless error.

tomrvincent
Rhodochrosite | Level 12
No problem. I think SAS keeps that bug to torment SAS newbies...like some sort of sick 'rite of passage' 🙂
SASKiwi
PROC Star

In my experience this message is mostly caused by SAS users not following correct SAS syntax. It's pretty difficult for code parsers to gracefully deal with all of the possible ways users get their syntax wrong. Most of the time this note warns correctly - there is an unmatched quote somewhere and you need to fix it. So hardly a bug in my opinion.   

tomrvincent
Rhodochrosite | Level 12
The bug is that you can't continue without exiting and restarting. That's a serious bug.

And nearly every cause is not following correct SAS syntax, so that's not an explanation. Nearly every other error can be corrected and the program rerun...except this one.
Kurt_Bremser
Super User

The bug is in the user's code. Any sufficiently bad code can bring an interpreting language system out of sync that does not completely reset itself with every submit.

The SAS interfaces (Studio and EG) try their very best to correct such mistakes with the "magic string" sent after each submit, but there are conditions where multiple issues (e.g. an open macro definition, with %mend missing or overridden by unbalanced quotes) cause that not to work as intended, and then you need to reset the session.

tomrvincent
Rhodochrosite | Level 12
No, the bug is how SAS responds to the error....a fatal flaw.
rickwatts
Calcite | Level 5

For what it's worth, and because it might help someone else Googling this same error, I have a problem with long labels in some generated code. The code runs just fine until the program file is %included. Then I get this error same error. The generated labels are clearly longer than the allowed 256 characters, but SAS seems to deal with it ok by simply truncating the labels, until the file is %included when at some point it just gives up and never finishes executing the data step.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 4648 views
  • 4 likes
  • 5 in conversation