Functions and CALL Routines |
Returns the process name that is associated with a given process
ID, or returns the name of the current process.
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;
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.