Functions and CALL Routines |
Category: | SAS File I/O |
Syntax | |
Arguments | |
Details | |
Examples |
Syntax |
ENVLEN(argument) |
specifies a character variable that is the name of an operating system environment variable. Enclose argument in quotation marks.
Details |
The ENVLEN function returns the length of the value of an operating system environment variable. If the environment variable does not exist, SAS returns -1.
Operating Environment Information: The value of argument is specific to your operating environment.
Examples |
The following examples are for illustration purposes only. The actual value that is returned depends on where SAS is installed on your computer.
SAS Statements | Results |
---|---|
/* Windows operating environment */ x=envlen("PATH"); put x; |
309 |
/* UNIX operating environment */ y=envlen("PATH"); put y; |
365 |
z=envlen("THIS IS NOT DEFINED"); put z; |
-1 |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.