Problem solve Get help with specific problems with your technologies, process and projects.

Alternative method to check library and file sizes

In regards to "Library size in a jiffy", although this will in fact work, I have several concerns. This utility itself uses up disk space. What will happen when files are in use in applications?

An alternative to running this utility would be to run the command: DSPLIB LIB( ) OUTPUT(*PRINT). This will total up the bytes used, including the amount used by the library object itself.

Another alternative would be to use the following API:
Retrieve Library Description (QLIRLIBD) API

This API returns the number of objects in a library and the library size. Currently, the only other function that does this is the Display Library (DSPLIB) command with OUTPUT (*PRINT). Without this API, the user would have to generate a list of objects, using the Display Object Description (DSPOBJD) command, to an output file (or use the QUSLOBJ API), and then count the number of objects and total the size of the objects (and include the size of the *LIB object itself).

Dig Deeper on Performance