SYSEXIST Function
Returns a value that indicates whether an operating-environment
variable exists in your environment.
Categories: |
SAS File I/O |
Special |
Syntax
Required Argument
argument
specifies a character
variable that is the name of an operating-environment variable that
you want to test.
Details
The SYSEXIST function
searches for the existence of an operating-environment variable and
returns 1 if the variable is found or 0 if the variable is not found.
Comparisons
The SYSEXIST function
tests for the existence of an operating-environment variable. The
SYSGET function retrieves the value of an operating-environment variable.
Example
The following example
assumes that HOME is a valid operating-environment variable in your
environment, and that TEST is not valid. SYSEXIST tests both values:
data _null_;
rc=sysexist("HOME");
put rc=;
rc=sysexist("TEST");
put rc=;
run;
SAS writes the following
output to the log:
If SYSEXIST returns
a value of 1, then the variable that is being tested is an operating-environment
variable. If SYSEXIST returns a value of 0, then the variable that
is being tested is not an operating-environment variable in your environment.