An Idea Exchange for SAS software and services

Comments
by Super User
on ‎07-29-2016 03:35 AM

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.

by Community Manager
on ‎07-29-2016 10:30 AM

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).

 

egpid.gif

 

I once blogged about this for SAS admins trying to find the right SAS.EXEs to examine/kill.

by PROC Star
on ‎07-30-2016 05:48 AM
I like processexplorer too Chris. Sadly we can seldom install anything on our computers. I must access these forums with IE and my text editor is notepad! Not long ago task manager was out of reach.....
by Occasional Contributor RobP
‎08-26-2016 02:08 PM - edited ‎08-26-2016 02:14 PM

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;

data _null_;
  file sascbtbl;
  infile datalines;
  input;
  put _infile_;
datalines4;
routine GetCurrentProcessId
   minarg=0
   maxarg=0
   stackpop=called
   callseq=byvalue
   module=kernel32;
;;;;
run;

%let current_sas_process_id = %sysfunc(modulen(*e,GetCurrentProcessId));
%put &current_sas_process_id;

data _null_;
  file "%sysfunc(pathname(work))\pid_&current_sas_process_id..txt";
  put "&current_sas_process_id";
run;

 

 

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.

by Community Manager
on ‎08-26-2016 03:08 PM

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.)

by Occasional Contributor RobP
on ‎08-26-2016 05:50 PM

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.

by Community Manager
on ‎03-08-2017 02:59 PM
Status changed to: Not Planned

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.

 

 

by PROC Star
on ‎03-08-2017 04:57 PM

@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?

by Community Manager
on ‎03-13-2017 12:33 PM

@ChrisNZ I shared an example on GitHub -- see if it helps to do what you're after.

by PROC Star
‎03-13-2017 11:27 PM - edited ‎03-13-2017 11:28 PM

@ChrisHemedinger This is no better for the same reason.

 

aaa1.PNG

 

Please change the status back from Not Planned

 

None of the suggested "workarounds" is usable by the target audience: SAS customers.

Idea Statuses
Top Liked Authors