SYSPROCESSNAME Function


SYSPROCESSNAME Function

Returns the process name associated with a given process id or the name of the current process

Category: Special

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' on page 849




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net