06-02-2017 07:26 AM
I'm trying to kill my SAS Session in an alert message created by my Stored Process Output.
Currently i have this macro:
%if &output_tp = 1 %then %do;
file _webout ;
After the alert "Process Terminated" i would like to execute something like x "kill -9 &SYSJOBID" but i don't know how to do it inside HTML.
Using 9.3 in Solaris
10-17-2017 03:58 AM
The good news: You can't do this inside html. The corresponding sas-process has not been started just for the job you are terminating. The process will be re-used to run other stored processes and eventually be killed after some time of inactivity - depends on configuration. Using endsas command inside stored process code is not recommended.
10-17-2017 04:11 AM
As @error_prone said this wouldn't be a good idea even if it were possible. One of the big advantages of running a SAS Stored Process Server is that you effectively have a pool of available sessions which will be used to quickly execute Stored Processes without the start-up costs associated with creating new sessions. My advice would be the same as @error_prone - just leave well alone, they won't be using much resource until you need them.