Iseries Operations

nmvfd18
nmvfd18 used Ask the Experts™
on
As400 library size did not change after files were deleted in the library?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gary PattersonVP Technology / Senior Consultant

Commented:
How did you check the lib size?

Author

Commented:
Using dsplib command.
Gary PattersonVP Technology / Senior Consultant

Commented:
please post a copy of the output
IT Consultant
Commented:
I expect you have used DSPLIB QSYS and viewed the "size" field for the library objects.
If this is the case the size field does not include the objects contained within the library, only the library object itself.
To determine the actual size of the library you would need to list all of the objects in the library and then total them using a query/sql statement, or by using the RTVDSKINF/PRTDSKINF commands.
Gary PattersonVP Technology / Senior Consultant
Commented:
DSPOBJD command, for example, just shows the size of the library object itself - not the sum of the size of all of the objects in the library.

DSPLIB LIB(mylib) OUTPUT(*PRINT) will show a summary line at the bottom containing the sum of the sizes of all the objects in the lib.  Quick and easy way to get the size of a single lib.

You can also use the QLIRLIBD API to retrive the size of a library, including contents: http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/qlirlibd.htm

You can use the DSPOBJD command and then query the output file. This is trickier than it sounds if you have very large objects in a lib. In the old days, we didn't have objects larger than 10GB, so ODOBSZ being 10 digits long was enough. Now the OS supports larger objects, so to calculate object size, multiply field ODBPUN (bytes per unit) times field ODSIZU (size of unit).

DSPOBJD OBJ(mylib/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(QTEMP/OBJECTS)

And if you need to get size information for all the libraries in the system, use the DISKTASKS tools:

http://www-01.ibm.com/support/docview.wss?uid=nas8N1019469

- Gary

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial