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.

9 REPLIES 9
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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 9 replies
  • 4092 views
  • 4 likes
  • 4 in conversation