Kbase P16941: How to find out the usage per data area
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
How to find out the usage per data area
GOAL:
Calculating data area usage
GOAL:
Using virtual system tables to identify data area usage
FACT(s) (Environment):
Progress 9.x
FIX:
Use virtual system tables to access information about used and unused space per data area. The code below demonstrates how to uses the _Area, _Areastatus and _AreaExtent tables.
FOR EACH _Area NO-LOCK:
DISPLAY _Area-name LABEL 'Area Name' WITH 2 COLUMNS.
FIND _Areastatus WHERE _Areastatus-Areanum = _Area._Area-number NO-LOCK.
DISPLAY _AreaStatus-Totblocks LABEL 'Total Blocks' FORMAT '>,>>>,>>9'
_AreaStatus-Extents LABEL 'Extent Blocks'
_AreaStatus-Totblocks - _AreaStatus-Hiwater - _AreaStatus-Extents LABEL 'Empty Blocks'
_AreaStatus-Freenum LABEL 'Free Blocks'
_AreaStatus-Hiwater - _AreaStatus-Freenum LABEL 'Active Blocks'
_Area-blocksize LABEL 'Block Size'
(_AreaStatus-Hiwater - _AreaStatus-Freenum) * _Area-blocksize LABEL 'Used space'
(_AreaStatus-Totblocks - _AreaStatus-Hiwater - _AreaStatus-Extents + _AreaStatus-Freenum) * _Area-blocksize LABEL 'Avail space' WITH 3 COLUMNS.
FOR EACH _AreaExtent OF _Area NO-LOCK:
DISPLAY _Extent-path FORMAT 'x(60)'.
END.
END.