GetEnv

Mon 01 January 2018

Syntax

GetEnv(env_var)

Description

Use the GetEnv function to return the value of an environment variable specified by env_var as a string. If the environment variable does not exist, GetEnv it returns a null string.

For example, you can use the GetEnv function to determine the actual path of PS_HOME . You could use this with the Exec function, which automatically prepends the command string with the path of PS_HOME .

Parameters

Field or Control

Definition

env_var

A string specifying the environment variable.

Important! Because the input string is converted to all uppercase, the env_var parameter is case-insensitive. While environment variable names are case-sensitive on UNIX systems—that is, "netdrive" is a different variable from "NetDrive"—in both cases, GetEnv returns the value of the NETDRIVE environment variable if it exists.

Returns

A string representing the value of the specified environment variable; Null if the variable does not exist.