BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi,

 

I'm playing on a new server, where they have EG configured to use rsubmits (basically rsubmit and endrsubmit are inserted as precode and postcode).

 

I noticed that if I submit:

 

%macro doit(x=1);
  %put x=&x;
%mend doit;

%doit()

 

everything breaks.  Note there is no trailing semicolon on the macro call.  After EG adds the wrapper, in effect I am submitting:

 

rsubmit;
%macro doit(x=1);
  %put x=&x;
%mend doit;

%doit()

endrsubmit;

 

 

It looks to me like in that case, SAS is not seeing the endrsubmit statement.  If I add a semicolon after %doit(), or even a /* */ comment, SAS will see the endrsubmit and everything works fine. 

 

Have other people seen this behavior from  SAS/Connect on EG?  Or PC SAS?  Curious if this is somehow an EG problem, or (more likely) a word scanner / tokenizer problem.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

You might be able to fix by adding the "quote killer" line at the start of your post-code option:

 

;*';*";*/;quit;

 

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

You might be able to fix by adding the "quote killer" line at the start of your post-code option:

 

;*';*";*/;quit;

 

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Quentin
Super User

Thanks Chris.  Yes, just changing the post code from endrsubmit; to ;endrsubmit;  fixed the problem.

 

Mostly was just curious if this same problem would happen with PC/SAS (in which case it's really the tokenizer or something like that that is having the problem), or if it is an  EG-only problem.  My guess is it would happen in PC/SAS too, but I don't have SAS/CONNECT on my PC SAS so can't test it.

 

As a side note, there have been times I thought it would be nice if there was a way to turn off EG's generation of the quote killer.  I've had a few times when I had an unmatched quote, but because EG always adds the quote killer, it took me a minute or two longer than usual to figure out what was going on.  But that's a minor point.  I can see the agument for always forcing the quote killer; I'm sure it cut down the number of calls to tech support with complaint  "my SAS session is hung and I don't know why.

 

(Left off the closing quote there, get it? : )

 

--Q.

BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
ChrisHemedinger
Community Manager

@Quentin - as you guess, bad things happen when you leave an open comment or quote when you submit a job to SAS.  The quote killer line is insurance that prevents many more problems than it causes...

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ChrisHemedinger
Community Manager

Oh, and you wondered if the behavior is unique to EG -- I doubt that it is.  I suspect if you sent the same code sequence in PC SAS you would have the same behavior in the CONNECT session.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 968 views
  • 2 likes
  • 2 in conversation