ENV - Get and Set system environment variable (Reports & Settings Report Generator function)

From Catalyst
(Redirected from REF:rprgfenv)
Jump to: navigation, search

Syntax

$ENV{var, value}

Description

Retrieve and set system environment variables.

Special

Special one character environment variables exist for accessing date and time details.

D
Day of the month, 2 digits with leading zeros. (01 to 31)
M
Month, 2 digits with leading zeros. (01 to 12)
Y
Year, 4 digits.
y
Year, 2 digits.
H
24-hour format of an hour with leading zeros. (00 to 23)
G
12-hour format of an hour with leading zeros. (01 to 12)
I
Minutes with leading zeros. (00 to 59)
S
Seconds with leading zeros. (00 to 59)
$ENV{"D"}/$ENV{"D"}/$ENV{"Y"}
The above in a text formula would result in '31/01/2013' for 31st Jan 2013.
$ENV{"G"}
$ENV{"I"}
The above in a text formula would result in '02:14' for 14 minutes past 2pm.


Parameters

var
A text parameter that can not be omitted.
System environment variable name.
value
A text parameter that can be omitted.
The value to set the environment variable to.

Returns

A text value. The system environment variable contents or spaces if the variable is being set.