The GetLibSize procedure returns the current size of a library.
The GetLibSize procedure can be used to retrieve the size (in bytes) of a library and a count of the number of objects contained in the library.
library-size GetLibSize( szLibName 10A Const nLibSize 20I 0 Options(*NOPASS : *OMIT) nObjCount 10I 0 Options(*NOPASS) ) |
|
See also: RtvLibL |
If the function succeeds, the size of the library, in bytes, is returned. The size is a sum of the size for all objects stored in the library and the size of library itself.
The return value should be a numeric variable that can hold at least 10 digits. The return value is defined as a 20i0 value (8-byte integer).
Please note: When the information for a large library is retrieved, depending on the CPU and overall system performance, this procedure can take several seconds to several minutes to calculate the library size.
The following example retrieves the library size, in bytes, for all the objects in the QGPL library and the QGPL library object itself.
/INCLUDE QCPYSRC,objects
.....DName+++++++++++EUDSFrom+++To+++++TDc.Functions+++++++++
D nLibSize S 20I 0
C Eval nLibSize = GetLibSize('QGPL')