SYSPROCESSNAME Function
Returns the process name that is associated with a given process ID, or returns the name of the current process.
| Category: | Special |
| Restriction: | This function is not valid on the CAS server. |
Table of Contents
Syntax
SYSPROCESSNAME(<process_id>)
Required Argument
process_id
specifies a 32–character hexadecimal process ID.
Details
The SYSPROCESSNAME function
returns the process name associated with the process ID that 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 as arguments
to SYSPROCESSNAME.
Examples
Example 1: Using SYSPROCESSNAME without an Argument in a DATA Step
The following DATA step
writes the current process name to the SAS log:
data _null_; name=sysprocessname(); put name; run;
Example 2: Using SYSPROCESSNAME with an Argument in SAS Macro Language
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;
See Also
Functions:
Copyright © SAS Institute Inc. All Rights Reserved.
Last updated: March 16, 2017