Consultor Eletrônico



Kbase P151735: 4GL/ABL: TODAY & NOW functions fail to INITIALize NEW GLOBAL SHARED VARIABLE
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/26/2010
Status: Verified

SYMPTOM(s):

4GL/ABL: TODAY & NOW functions fail to Initialize NEW GLOBAL SHARED VARIABLE

TODAY & NOW functions fail to Initialize NEW GLOBAL SHARED VARIABLEs in DEFINE NEW GLOBAL SHARED VARIABLE statements with the INITIAL option.

The TODAY function fails to initialize the GLOBAL SHARED DATE variable in the following two statements:
DEFINE NEW GLOBAL SHARED VARIABLE dtVar AS DATE INITIAL TODAY.
DISPLAY dtVar.

The NOW function fails to initialize the GLOBAL SHARED DATETIME variable in the following two statements:
DEFINE NEW GLOBAL SHARED VARIABLE dmVar AS DATETIME INITIAL NOW.
DISPLAY dmVar.

GLOBAL SHARED DATE fails to initialize to TODATE value in the following statement even though the underlying LIKE field has an INITIAL value of TODAY:
DEFINE NEW GLOBAL SHARED VARIABLE gs-depdt LIKE bpost.depdt.

GLOBAL SHARED DATE variable in the following statement initializes to the unknown value (?) even though its LIKE table field has an INITIAL value of TODAY:
DEFINE NEW GLOBAL SHARED VARIABLE gs-depdt LIKE bpost.depdt.

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.2A

CAUSE:

Bug# OE00190112

CAUSE:

This is a regression bug that was introduced in OpenEdge 10.2A. The problem does not exist in OpenEdge 10.1A, 10.1B or 10.1C

FIX:

Upgrade to OpenEdge 10.2A03 or later.

Alternatively, as workaround is also possible to avoid initializing NEW GLOBAL SHARED VARIABLEs in the DEFINE VARIABLE statements and to rely on explicitly assigning the initial values for these variables. For example, rewrite the above two statements as:

DEFINE NEW GLOBAL SHARED VARIABLE dtVar AS DATE.
DEFINE NEW GLOBAL SHARED VARIABLE dmVar AS DATETIME.

ASSIGN
dtVar = TODAY
dmVar = NOW.