getenv

Reads an environment variable from the operating system.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

string getenv(env-name)
string        env-name

Description

env-name specifies the variable to read. If none is defined, the function returns an empty string.

Notes

In VMS, environment variables correspond to logicals and symbols.

Example

Finds the name of the output device that is to be used.
printer = getenv("PRINTER");