BookmarkSubscribeRSS Feed

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.

 

 

19 Comments
paulkaefer
Lapis Lazuli | Level 10

@ChrisHemedinger, I appreciate you sharing that example. I was able to download it, and I seem to have followed the steps correctly, but even with restarting, I do not see the PID. Any suggestions?

ChrisHemedinger
Community Manager

@paulkaefer Can you tell me your version of EG? And whether you're using 32- or 64-bit EG?  In the meantime, I'll take a look and test some other scenarios.

paulkaefer
Lapis Lazuli | Level 10

@ChrisHemedinger, I figured it out. Instead of "EnterpriseGuide(ver)" in your readme, it should be "EnterpriseGuide/(ver)/". I didn't see the version folder earlier.

paulkaefer
Lapis Lazuli | Level 10

@ChrisNZ, could you download the master .zip archive of the GitHub repo and extract the .dll?

ChrisNZ
Tourmaline | Level 20

The PID disappears when a project is open, to be replaced by project name.

 

The suggested add-in is a proof of concept, not a usable workaround. 

 

Please reopen this suggestion.

ChrisHemedinger
Community Manager

One other trick that I shared with @broz offline.  

 

You can figure out the PID from the Help->About, Configuration details window.  It’s appended to the TEMP directory that EG uses for the application session.  Alas, this is not surfaced in SAS code or anywhere more visible, but sharing in case it helps with at least some use cases.

 

PID is appended to TEMP folder namePID is appended to TEMP folder name

paulkaefer
Lapis Lazuli | Level 10

That's really useful, @ChrisHemedinger! Occasionally EG will crash (or the process gets killed by the user). I've gone to the %temp% folder, and sorted by date modified to find the latest SEG* folder. You can find .sas files, which sometimes might have changes since you last saved.

 

I didn't realize the * after SEG was the PID. Neat!

ChrisHemedinger
Community Manager

Just keep in mind that this is a current behavior, not a feature, @paulkaefer.  It's been like this for a long time (pretty sure I stuck that in there plus the code that's meant to clean up when you exit cleanly), but it could change in some future release.  I have passed this suggestion on to the dev team, and even though it's marked Not Planned, they get the gist and the spirit of the request might be helped forward in the next big release.

paulkaefer
Lapis Lazuli | Level 10

Totally understood, @ChrisHemedinger. Even just an automatic macro variable would be nice (though I appreciate your workaround, especially if I need to use the Task Manager and have multiple sessions open).

 

I would add a macro variable to the usual code I have EG run on server connect, which is currently like:

 

filename mymail email "my_email@example.com"
        subject="Autoexec for &SYSDATE9. at &systime";

data _null_;
    file mymail;
    put "SAS EG session started on &SYSDATE9. at &systime.: writing to ";
    put &SASWORKLOCATION.;
run;