ENVIRONMENT_VARIABLE_INFO view
The ENVIRONMENT_VARIABLE_INFO view contains information about environment variables.
The values returned for the columns in the view are similar to the values returned by the WRKENVVAR CL command or Get All System-Level Environment Variables API. Refer to the API for more detailed information.
Authorization: None required.
The following table describes the columns in the view. The system name is ENV_VARS. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
ENVIRONMENT_VARIABLE_TYPE | VAR_TYPE | VARCHAR(6) | The type of environment variable.
|
ENVIRONMENT_VARIABLE_NAME | VAR_NAME | VARGRAPHIC(128) CCSID 1200 | The name of the environment variable. If the name is longer than 128 characters, it will be truncated with no warning. If ENVIRONMENT_VARIABLE_CCSID is 65535, the content of this column is set using the job default CCSID. |
ENVIRONMENT_VARIABLE_VALUE | VAR_VALUE | VARGRAPHIC(1024) CCSID 1200 Nullable
|
The current value of the environment
variable. If the value is longer than 1024 characters, it will be
truncated with no warning. If ENVIRONMENT_VARIABLE_CCSID is 65535,
the content of this column is set using the job default CCSID. Contains null if there is no value. |
ENVIRONMENT_VARIABLE_BINARY_NAME | VAR_BNAME | VARBINARY(128) | The name of the environment variable in binary form. This is the raw value for the name. If the name is longer than 128 characters, it will be truncated with no warning. |
ENVIRONMENT_VARIABLE_BINARY_VALUE | VAR_BVALUE | VARBINARY(1024) Nullable
|
The current value of the environment
variable. This is the raw value for the value. If the value is longer
than 1024 characters, it will be truncated with no warning. Contains null if there is no value. |
ENVIRONMENT_VARIABLE_CCSID | VAR_CCSID | INTEGER | The CCSID value associated with the environment variable. |
Example
Look at all system level environment variables and their values for this connection:
SELECT ENVIRONMENT_VARIABLE_NAME, ENVIRONMENT_VARIABLE_VALUE
FROM QSYS2.ENVIRONMENT_VARIABLE_INFO
WHERE ENVIRONMENT_VARIABLE_TYPE = 'SYSTEM'