Kbase P23059: How to determine the current BI File Threshold size using 4G
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  23/04/2003 |
|
Status: Unverified
GOAL:
How to programmatically determine the current BI File Threshold size '-bithold' using 4GL?
FACT(s) (Environment):
Progress 9.x
FIX:
The following 4GL code parses the database log file and returns the Recovery Log Threshold (-bithold) Size in KBs:
DEFINE VARIABLE cDBLogFileInLine AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDBStatusLastOpen AS CHARACTER NO-UNDO.
DEFINE VARIABLE lDBStatusLastOpen AS LOGICAL NO-UNDO.
DEFINE VARIABLE dBIThresholdSize AS DECIMAL NO-UNDO.
FIND FIRST _DBStatus NO-LOCK NO-ERROR.
FIND FIRST _Logging NO-LOCK NO-ERROR.
ASSIGN
cDBStatusLastOpen = _DBStatus._DBStatus-LastOpen
lDBStatusLastOpen = FALSE.
INPUT FROM VALUE(DBNAME + ".lg").
REPEAT:
IMPORT UNFORMATTED cDBLogFileInLine.
IF INDEX(cDBLogFileInLine, cDBStatusLastOpen) > 0 THEN
lDBStatusLastOpen = TRUE.
IF lDBStatusLastOpen AND INDEX(cDBLogFileINLine, "-bithold") > 0
THEN
DO:
dBIThresholdSize = DECIMAL(ENTRY(10, cDBLogFileInLine, "
")) * 1024.
LEAVE.
END.
END.
INPUT CLOSE.
IF dBIThresholdSize = 0 THEN
MESSAGE "The Recovery Log Threshold Size Parameter (-bithold) Is Not Set"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE "The Recovery Log Threshold Size Parameter (-bithold) Is Set To:"dBIThresholdSize "KB"
VIEW-AS ALERT-BOX INFO BUTTONS OK.