Consultor Eletrônico



Kbase P95907: OS-GETENV does not return values including some characters on Appserver
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/7/2004
Status: Unverified

FACT(s) (Environment):

Windows

SYMPTOM(s):

OS-GETENV does not return values including some characters on Appserver

OS-GETENV returns null value when retrieving an environment variable defined on the Appserver, that has an '@' or '$' symbol in its value.

Environment variables defined like:
ReplyTo = bla@progress.com
fail to return a value with OS-GETENV.

CAUSE:

This is expected bahaviour.
The ubroker.properties file uses $ and @ to represent substitutions for environment variables and registry settings. The comments in the ubroker.properties file explain this:
# Comments indicate which properties you cannot modify. Many properties have
# pre-defined defaults. Environment variables are valid for all properties
# (both numeric and character) using the standard conventions - $ENVVAR or
# ${ENVVAR}. Also, the escape character is supported (e.g \$) so that
# you can include a '$' as a keyword value.
# In addition to environment variables, Registry values are also supported.
# The syntax for specifying a value from the registry is @{Key\Value}.
# Where 'Key' is a registry key off the PROGRESS base key:


FIX:

To resolve this problem precede the character causing the problem with the escape tilde character to force Progress to interpret is as a character literal. For example with an environment variable defined as:
ReplyTo=bla~@progress.com
OS-GETENV('ReplyTo') returns 'bla@progress.com'.