Previous Page | Next Page

Functions and CALL Routines

SYSPROCESSNAME Function



Returns the process name that is associated with a given process ID, or returns the name of the current process.
Category: Special

Syntax
Arguments
Details
Examples
Example 1: Using SYSPROCESSNAME Without an Argument in a DATA Step
Example 2: Using SYSPROCESSNAME With an Argument in SAS Macro Language
See Also

Syntax

SYSPROCESSNAME(<process_id>)


Arguments

process_id

specifies a 32-character hexadecimal process id.


Details

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.


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

Function:

SYSPROCESSID Function

Previous Page | Next Page | Top of Page