The following ABL code example reports the BI file size and the BI Threshold (-bithold) value:
- There is no VST value that shows the -bithold value.
- The size of the bi value to suspend processing can be found by parsing the database startup line, parameter file (.pf), or database log file. The following code example parses the <dbname>.lg file
- Knowing the current bithold value, following article provides a further example to proactively raise a warning:
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.
DEFINE VARIABLE dLogingBiLogSize AS DECIMAL NO-UNDO.
FIND FIRST _DBStatus NO-LOCK NO-ERROR.
FIND FIRST _Logging NO-LOCK NO-ERROR.
ASSIGN cDBStatusLastOpen = _DBStatus._DBStatus-LastOpen
dLogingBiLogSize = _Logging._Logging-BiLogSize
lDBStatusLastOpen = FALSE.
INPUT FROM VALUE(DBNAME + ".lg").
REPEAT:
IMPORT UNFORMATTED cDBLogFileInLine.
IF INDEX(cDBLogFileInLine, cDBStatusLastOpen) GT 0 THEN
ASSIGN lDBStatusLastOpen = TRUE.
IF lDBStatusLastOpen AND INDEX(cDBLogFileINLine, "-bithold") GT 0 THEN
DO:
ASSIGN dBIThresholdSize = DECIMAL(ENTRY(10,cDBLogFileInLine," ")) * 1024.
LEAVE.
END.
END.
INPUT CLOSE.
IF dBIThresholdSize = 0 THEN
MESSAGE "The Bi File Size Now Is" dLogingBiLogSize "KB. "
"The Recovery Log Threshold Size Parameter (-bithold) Is Not Set"
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ELSE
MESSAGE "The Bi File Size Now Is" dLogingBiLogSize "KB Which Is"
INTEGER(100 * dLogingBiLogSize / dBIThresholdSize)
"Percent Of The Recovery Log Threshold Size Set To" dBIThresholdSize
VIEW-AS ALERT-BOX INFO BUTTONS OK.