Desktop productivity for business analysts and programmers

How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Accepted Solution Solved
Reply
Trusted Advisor
Posts: 1,052
Accepted Solution

How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Hi, all

I'm experimenting with a custom task framework that over several submissions will submit snippets of IML code.

The problem is that that when I submit the code "proc iml;" via a custom task, EG is adding a line of

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

at the end of the submission, which of course is exiting IML.

Does anyone know if there is a property or other element of the custom task toolkit that I can use to stop EG from submitting this additional code?

Thanks,

  Tom


Accepted Solutions
Solution
‎05-24-2015 12:45 PM
Community Manager
Posts: 2,693

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Tom,

You cannot prevent EG from submitting this "epilogue" in the "traditional" task -- the kind where you let EG submit the code for you.

But you can build your own custom task that supports interactive-style processing by using the ISASTaskExecution API.  In that case, you don't return a SAS program for EG to run.  Instead, EG tells your task when it's ready and calls Run on it.  Within the Run method, you can use the SasSubmitter class to run your program and get the output.

If you're looking at my book, the Command Prompt task and Data Set->DATA Step task are examples of ISASTaskExecution.  The Macro Variable Viewer task has an example of using the SasSubmitter methods.

Chris

View solution in original post


All Replies
Trusted Advisor
Posts: 1,213

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Would be nice to have an option to turn off EG adding this magic string.  Once or twice I've had an unmatched quote but didn't notice it right away because EG added the magic string, and the length of the quoted string wasn't long enough to trigger the 'you may have an unmatched quote' message. 

The magic string provides a level of protection to prevent people from mistakenly thinking their SAS session is hung when they submit code with an unmatched quote or forget to end a block comment.  But for those of us who are used to having that problem when we make a mistake in our code, it can be confusing when it doesn't happen.

Valued Guide
Posts: 3,206

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

That code mustbe found in the EGuide installation (program files/SAShome). It sounds weird but SAS feared users could change all kind of things in a SAS installation (autoexec.sas config.sas) and wanting to prevent that moved that code into the Eguide software. When you can change your Eguide installation by yourself (not a closed desktop policy)  you can change that.24484 - How to automatically execute code when SAS® Enterprise Guide® opens  https://communities.sas.com/message/171219 

It is the same area of the autoeg.sas (4.1) location. When going around there I found nested structure of about 7 files being used at startup of the Eguide session/transaction.
There is code at the start (end?) of the session and of each transaction. Normally you will only see the transaction level (code start/end). 
The session-init will be seen in parallel code submission, this is long unwanted part of all that stuff. It is always present in activated logging of the WS but not many will see that.

It makes sense to not have that magic string submitted-code for experienced users  and getting more reliable code being stored for batch-processing (Quentin/TomK).

Wondering when ChrisH will come in.      

---->-- ja karman --<-----
Trusted Advisor
Posts: 1,052

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Hi, Jaap

I took a pretty good look around the EG flotsam and jetsam, but I couldn't find any indication that the ";*';*";*/;quit;" string is stored in any of those files. I suspect it's in the EG code itself.

However, if you know of a particular file that contains it, by all means let me know, and I'll dig into it!

Thanks,

  Tom

Solution
‎05-24-2015 12:45 PM
Community Manager
Posts: 2,693

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Tom,

You cannot prevent EG from submitting this "epilogue" in the "traditional" task -- the kind where you let EG submit the code for you.

But you can build your own custom task that supports interactive-style processing by using the ISASTaskExecution API.  In that case, you don't return a SAS program for EG to run.  Instead, EG tells your task when it's ready and calls Run on it.  Within the Run method, you can use the SasSubmitter class to run your program and get the output.

If you're looking at my book, the Command Prompt task and Data Set->DATA Step task are examples of ISASTaskExecution.  The Macro Variable Viewer task has an example of using the SasSubmitter methods.

Chris

Trusted Advisor
Posts: 1,052

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Thanks, Chris

I think (?!?) this is exactly what I'm after, although I'll have to get a little more adept with these concepts to know for sure.

Thanks for pointing me in the right direction!

  Tom

Community Manager
Posts: 2,693

Re: How can I get Enterprise Guide to not add the ";*';*";*/;quit;" suffix line when a custom task is submitted

Sure thing Tom.  If you want a .NET test harness that supports interactive procedures, check out the SasHarness sample that I presented at SAS Global Forum a couple of years ago.

This app doesn't have the benefits of the SAS.Tasks.Toolkit helper classes, but you can play with some of the possibilities.

Chris

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 478 views
  • 3 likes
  • 4 in conversation