Consultor Eletrônico



Kbase P109306: Value from a field that belongs to a VST is stuck at 2147483647
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0x

SYMPTOM(s):

Value from a field that belongs to a VST is stuck at 2147483647

Corresponding value in promon is correct.

Value in promon is equal to or higher than 2147483648.

CAUSE:

This is expected behavior.

The counters that display correctly in promon and have values equal to or higher than 2,147,483,648 are clearly stored as 64-bit quantities in shared memory.
Unfortunately, to date the 4GL does not support 64-bit integers, and actually uses 32-bit mathematics. Therefore, when the 64-bit quantities in shared memory have to be stored as fields in the respective VST records, they must be adjusted to fit a 32-bit signed integer; because of this, there is no way that the information in the VST can be any longer accurate, and it was a conscious design decision that values that cannot fit a 32-bit signed integer should simply be clipped to the maximum value that a 32-bit signed integer can store, that is: 2,147,483,647.

FIX:

Write a 4GL program that runs promon via the OS-COMMAND statement; promon should read the input from a file containing the keystrokes necessary to view the VST field's correct value, and redirecting the standard output to a file. Then, parse the output file.

For example, in order to read the value of _ActSummary._Summary-RecReads, use:

DEFINE VARIABLE cString AS CHARACTER NO-UNDO.
DEFINE VARIABLE deValue AS DECIMAL NO-UNDO INITIAL ?.

OS-COMMAND SILENT VALUE("promon test2000 < myKeystrokes.txt > myPromon.txt").

INPUT FROM myPromon.txt.
REPEAT:
IMPORT UNFORMATTED cString.
IF cString BEGINS "Record Reads" THEN DO:
ASSIGN cString = SUBSTRING(cString, 13) /* Removes "Record Reads" */
cString = LEFT-TRIM(cString, " ") /* Removes leading spaces */
cString = ENTRY(1, cString, " ") /* Takes the first non-blank value */
deValue = DECIMAL(cString).
LEAVE.
END.
END.
INPUT CLOSE.

DISPLAY deValue FORMAT "ZZZ,ZZZ,ZZZ,ZZ9".

myKeystrokes.txt should contain the following, which directs promon to the Activity Summary screen from within the R&D options and then exits:

R&D
2
1
X