LogiView

Function 'client_env'

     

The result of a 'client_env' function is the value of a client environment variable.

After calling a modal widget (including LogiView application forms) this function can only work correctly after returning to the main event loop. Therefore, it may be best to execute this function at the beginning of a LogiView application and before calling LogiView application forms or a userexit.
 

Syntax:

  {STR_VAR}= client_env ({STR_EXPR})
 

I/O parameters:

{STR_EXPR}

Name of the client environment variable.

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

-  
 

Return value:

 
{STR_VAR} String contains the value of the environment variable.
 

Example:

  Declaration of Variables
  10 DOCU_STRING_1=client_env("PATH")
20 put(DOCU_STRING_1)

Result:

Functions and commands: Operating System Interface
 

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.