name | A string constant containing the name of the environment variable. |
default | Optional. A string constant containing the default value to use if the environment variable does not exist. |
Return: | GETENV returns a STRING value. |
The GETENV function returns the value of the named environment variable. If the environment variable does not exist or contains no value, the default value is returned.
Example:
g1 := GETENV('namesTable');
g2 := GETENV('myPort','25');
OUTPUT(GETENV('HPCC_DEPLOYMENT', 'unknown'));
OUTPUT(g1);
OUTPUT(g2);
See Also: Environment Variables