LogiView

Function 'environment'

     

This function returns the value of an environment variable / parameter of the client or the server.

Available environment parameters include:

CLI_VER client version
CLI_HWS client hardware key
CLI_DSP client display (Motif only)
CLI_HST client host name
DTV_VER server version
DTV_HWS server hardware key
DTV_HST server host name
SINGLE_WILDCARD single wild card character (.e.g "?")
MULTI_WILDCARD multiple character wild card (.e.g "%")
SYSTEM_LANGUAGE The current language of the system. In case a macro is used to set the system language via lng_set_act_sys, only SYSTEM_LANGUAGE is updated, and the value for SYSTEM_LANGUAGE can be different from the value set in UI_LANGUAGE.
USER_LANGUAGE The current language of the current user. In case a macro is used to set the user language via lng_set_act_usr, only USER_LANGUAGE is updated, and the value for USER_LANGUAGE can be different from the value set in DATA_LANGUAGE.
UI_LANGUAGE The system language defined by the default LANGUAGE_SYSTEM
DATA_LANGUAGE The user language defined by the default LANGUAGE_USERDATA
 

Syntax:

  {STR_VAR}= environment ({STR_EXPR})
 

I/O parameters:

{STR_EXPR}

name of environment variable / parameter (see description).

The name of an environment variable must always be in ASCII.

-  
 

Return value:

 
{STR_VAR} This string contains the value of the environment variable.
 

Example:

  Declaration of Variables
 
10 DOCU_STRING_1 = environment("DTV_HWS")

20 put(DOCU_STRING_1)
 

Result:

Functions and commands: Operating System Interface

 

UTF8 Conversion on UNIX Server

 

When the EDM Server is installed on UNIX and the LogiView function 'environment' is used to get the content of an environment variable, the converter name is derived from the locale settings, especially the LANG environment variable.

To use UTF-8 as locale setting, the following values can be set in the customizing script of Agile e6.

Use csh syntax.

  • HP-UX:
    setenv LANG "en_US.utf8"
  • Other Unix platforms:
    setenv LANG "en_US.UTF-8"

Scripts that set environment variables for the EDM Server must be written using the correct encoding.

The environment variable LANG must be set to the matching value, and the variable must also contain data matching this setting, before the EDM Server starts up and before the UTF-8 environment variable will be set.

 

UTF8 Conversion on Windows Server

 

On Windows, the C API function _wgetenv is used. With this function the server reads environment strings in Unicode and converts the values to UTF-8 internally.

Values stored via the Windows Control Panel - including predefined variables like USERNAME and PATH - may contain any Unicode character.

Scripts that set environment variables for the EDM server to non-ASCII values must be written using the correct Windows codepage. The Windows command shell (cmd.exe) does not support Unicode without additional configuration.