As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips Talk:Get Process ID (PID) of SAS Tasks Running on Unix and Linux

From sasCommunity
Jump to: navigation, search

That should be Linux not Linus--Howles 08:53, 19 November 2008 (EST)

Reviewed --Art Carpenter 01:14, 16 January 2009 (EST)
Looks good to me!--Nancy 20:16, 23 January 2009 (EST)

good to me--Statprof 10:42, 26 February 2009 (EST)

why not add another major platform on which SAS runs: On Microsoft Windows the standard SAS session uses the process ID to make the name of the work library unique. In work library path C:\Program Files\SAS\SAS Temporary Files\_TD5660, the processID is prefixed _TD and is therefore processID 5660 On each customer installation the prior part of the path will probably be different, but enjoy the consistency of _TD{processID} Macro syntax to extract this: %let processID = %substr( %scan( %sysfunc( pathname( work )), -1,_ ), 3 ) ;

But before I close, let me report that SAS9.1.3-sp4 on my customer site MS-windows reports &SYSJOBID provides the same processID as that one I tested coming out of that macro syntax !!

Nice one Mikee