The following ABL code computes the total number of clusters in the before-image log.
- The amount of data in the BI file in kilobytes,
- There may be unused but allocated space after these clusters, if fixed bi extents are being used.
FIND _areastatus no-lock where _areastatus-areanum = 3.
FIND _dbstatus no-lock.
DISPLAY "Total BI Clusters:" string(_areastatus-hiwater * _dbstatus._dbstatus-biblksize
/ _dbstatus-biclsize / 1024 ) + " kb".
Free space in the BI file(fixed BI Extent) can be calculated using the below formula
Total size of BI Extent - The Amount of used space
To calculate the total size of the before-image log, multiply the number of clusters from the above result with the before-image cluster size (_dbstatus._dbstatus-biclsize) which is stored as KB.
Total before-image log size in KB:
FIND _areastatus no-lock where _areastatus-areanum = 3.
FIND _dbstatus no-lock.
DISPLAY
(_areastatus-hiwater *
_dbstatus._dbstatus-biblksize /
_dbstatus-biclsize /
1024) *
_dbstatus-biclsize.