Open topic with navigation
ENVIRONMENT name TYPE type SIZE size [DESCRIPTION "description"][FORMAT "format"] [USERTEXT "user_text"] [PRECISION dec_places] [STORED store_format] [JUST just]
The name of the temporary environment field to be created. It can have up to 15 characters and cannot contain spaces.
The data type of the environment field. Valid values are ALPHANUMERIC, NUMERIC, DATE, TIME.
The length of the environment field.
(optional) A description of the environment field. It can have up to 40 characters.
(optional) The display format for the environment field. It can have up to 40 characters.
(optional) A user‑defined text string associated with the environment field. It can have up to 40 characters.
(optional) The number of characters to the right of the decimal point in an implied‑decimal environment field. If the data type is implied‑decimal, this attribute must be present, and it must be less than or equal to the size of the field. Otherwise, the field is ignored.
(optional) Specifies the date storage format. Valid values are:
(optional) The justification of the environment field. Valid values are:
LEFT (default for alpha, date, time, and user type fields)
CENTER (valid only for alpha and user fields)
RIGHT (default for decimal and implied‑decimal fields; not allowed for alpha)
The ENVIRONMENT statement describes a temporary environment field to be created in a report.
Environment fields are used to obtain data from the system environment. They are temporary fields that are not found in the repository. You must specify the field’s name, data type, and size. The maximum number of environment fields that can be defined in a report is 99.
If the temporary environment field does not have a unique name, it must be preceded by “TEMP.”. For example, if the temporary field is called SYSTEM and one of the selected files also contains a field called SYSTEM, you would specify the temporary field like this:
ENVIRONMENT ENVIRON1 TYPE ALPHANUMERIC SIZE 30
ENVIRONMENT ENVIRON2 TYPE DATE SIZE 6 FORMAT "MM/DD/YY" USERTEXT "Start Date" STORED YYMMDD