Top  Previous  Next


The ENV() function retrieves an operating system environment variable.








var.nameis the name of the variable to be retrieved.



The ENV() function retrieves the named operating system environment variable, returning its value. If the variable is not defined or var.name is invalid a null string is returned.


In general, environment variables do not change during the life of a QM session. For example, on a Linux system, the PWD environment variable stores the current working directory pathname. Within QM, use of ENV('PWD') will return the value of the environment variable passed to the QM process when it started. Using LOGTO, which effectively changes the current working directory, will not affect the value of the PWD environment variable within QM. A shell process started using SH after the LOGTO will see the new value of PWD as environment variables are maintained separately for each Linux process.