07-13-2007 06:18 AM
10-01-2007 02:18 PM
10-01-2007 04:40 PM
02-02-2014 06:32 AM
If today, nearly six and one-half years later, there is still no easy solution to this, here is something that can help.
Modify the stored process to include code for the user to send an email to herself/himself. That message could include the Process ID (PID) as well as any other useful information to identify the Stored Process. You simply need to use the automatic macro variable SYSJOBID.
From SAS Companion for Windows:
SYSJOBID returns a number that uniquely identifies the SAS task under Windows.
If running SAS on a standalone PC, you can use the Windows tasklist command to verify that SYSJOBID is the Windows Process ID (PID) for your SAS session.
From SAS Companion for UNIX:
SYSJOBID lists the process identification number (PID) of the process that is executing SAS (for example, 00024).
The above documentation excerpts prompt for me this question:
What is the justification for the misleading name on the automatic macro variable called SYSPROCESSID?
If you display it in your SAS log with a %PUT command, you will get a 32 character hexadecimal string such as 41D96EED34F0D4FE4018000000000000
It does NOT translate into the Windows or UNIX SYSJOBID, which IS the Process ID.
In every case, the last 12 characters are zeroes.
Back on subject, if a user has a problem with a Stored Process, the email to the user (from the Stored Process) containing the Process ID will furnish the needed information to pass on to the SAS Administrator or the Windows/Unix Administrator, who can kill the process.
(Of course, if the Stored Process were running under the ID of the user, then the user could kill the process.)
For some references on managing, monitoring, and controlling SAS processes on SAS servers (or on a standalone PC), see