Returns the process name associated with a given process id or the name of the current process
Category: Special
SYSPROCESSNAME (< process_id >)
process_id
specifies a 32-character hexadecimal process id.
The SYSPROCESSNAME function returns the process name associated with the process id you supply as an argument. You can use the value returned from the SYSPROCESSID function as the argument to SYSPROCESSNAME. If you omit the argument, then SYSPROCESSNAME returns the name of the current process.
You can also use the values stored in the automatic macro variables SYSPROCESSID and SYSSTARTID as arguments to SYSPROCESSNAME.
The following DATA step writes the current process name to the SAS log:
data _null_; name=sysprocessname(); put name; run;
The following SAS Macro Language code writes the process name associated with the given process id to the SAS log:
%let id=&sysprocessid; %let name=%sysfunc(sysprocessname(&id)); %put &name;
Function:
'SYSPROCESSID Function' on page 849