When EG freezes, there is no way of knowing which EG session to kill.
Variable SYSJOBID gives the SAS server proces number.
A way to know the local EG process number would allow us to save it somewhere (a text file saved in the work directory at connection time for example).
A startup option to have this process number added to the window title would be another way to deal with this ongoing problem.
With the Process Explorer workaround given, this is not planned by SAS R&D. However, it's not difficult to create a custom task that implements this. I just prototyped something quickly -- here's a screenshot of the result. Let me know if you're interested in this approach.
Like the idea of an option that adds the process number to the window title. Window title is still shown even when EG is completely dead.
One of my favorite Windows tools is Process Explorer (formerly Sysinternals, but now a Microsoft tool). You can drag a little window "wheel" to the "hung" window, and it will show you which PID is the culprit. You can also filter by user ID, command line, and open file handles (look for the EGP file that's open).
I once blogged about this for SAS admins trying to find the right SAS.EXEs to examine/kill.
Agreed - process explorer is the bomb. @ChrisNZ I don't know if you have the ability to auto-run SAS code on EG startup, but this code will calculate the EG process ID for you and write it to a file in your work folder. It's would be a satisfactory workaround until SAS-Christmas comes around...
filename sascbtbl "%sysfunc(pathname(work))\sascbtbl.txt" lrecl=500;
%let current_sas_process_id = %sysfunc(modulen(*e,GetCurrentProcessId));
According to the documentation (http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p16v72tro1likwn10w...) you can only change the window title for a SAS session on startup. Not sure if the same applies to EG or not, I couldn't find anything title-specific for EG when searching.
Hi @RobP - good tips, but these would work only for the SAS.exe process and not the SEGuide.exe process, which is what @ChrisNZ is after. (I'm sure he's not the only one -- he's just the one who took time to ask.)
Ah I see... I tested the code in EG and when it returned a number I assumed it was the EG PID. I should have double checked against Process Explorer before posting....
So I'm guessing EG launches calls to SAS in a new process every time code is executed, and EG doesn't actually ever execute any 'SAS' code.
@ChrisHemedinger Your workaround is unavailable to most EG users as most company desktops are (rightfully) fully locked, and/or staff can be fired for running non-approved programs.
Can you tell us more about the custom task?
@ChrisNZ I shared an example on GitHub -- see if it helps to do what you're after.
@ChrisHemedinger This is no better for the same reason.
Please change the status back from Not Planned
None of the suggested "workarounds" is usable by the target audience: SAS customers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.