FGETENV: Retrieving the Value of an Environment Variable

How to:

The FGETENV function retrieves the value of an operating system environment variable and returns it as an alphanumeric string.


Top of page

x
Syntax: How to Retrieve the Value of an Environment Variable
FGETENV(length, varname, outlen, output_format)

where:

length

Integer

Is the number of characters in the environment variable, varname.

varname

Alphanumeric

Is the name of the environment variable whose value is being retrieved.

outlen

Integer

Is the length of the environment variable value that is returned.

output_format

Alphanumeric



Example: Retrieving the Value of an Environment Variable

This example,

FGETENV(6, 'WINDIR', 16, 'A16')

returns C:\WINDOWS by default.

This example,

FGETENV(9, 'EDAEXTSEC', 3, 'A3')

returns ON, if the iWay server’s security is on.


iWay Software