Chapter Contents |
Previous |
Next |
%SYSGET |
Type: | Macro function |
Syntax | |
Details | |
Example | |
Using SYSGET in a UNIX Operating Environment |
Syntax |
%SYSGET(environment-variable) |
Details |
The %SYSGET function returns the value as a character string. If the value is truncated or the variable is not defined on the operating environment, %SYSGET displays a warning message in the SAS log.
You can use the value returned by %SYSGET as a condition for determining further action to take or parts of a SAS program to execute. For example, your program can restrict certain processing or issue commands that are specific to a user.
For details, see the SAS documentation for your operating environment.
Example |
This example returns the id of a user on a UNIX operating environment:
%let person=%sysget(USER); %put User is &person;
Executing these statements for user ABCDEF prints this in the SAS log:
User is abcdef
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.