Trying to print library size

Tags:
AS/400
Adrian asked the editors of Search400.com, "How do I run a prtlibsiz for all libraries on the AS/400's?" He's tried to do a prtlibsiz (addlible tools first), but that didn't work. He tried a rtvdsfinf, but he got the following error: Command RTVDSKINF not allowed in this setting. He also tried the command addlible dasdsaver, but that didn't work either. What other options does he have? He's running V5R3M0 with latest CUME C5207530 installed. -- Michelle Davidson, editor, Search400.com
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

DSPLIB LIB(*All) OUTPUT(*PRINT)

Run this in a batch job.

This will show you the size of all objects in the libraries but it shows the total library size at the bottom of each library in the list.

There are a lot better ways of getting the library sizes but this is one of the easiest ways.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • WaltZ400
    I would do a RTVDSKINF to build library information and then a PRTDSKINF to print the collected information. The nice thing about the report you get in PRTDSKINF, is that it totals disk used to store spool files, documents, and other system objects. If you are trying to execute RTVDSKINF interactively, this is why you are getting the message. The command is shipped with defaults allowing only batch running of this command. It is so labor intensive, you wouldn't want to run this inteactively even if you could.
    655 pointsBadges:
    report
  • DonKennedy
    GO DISKTASKS. Option 1 will schedule collection of disk space (hopefully off hours, if objects are being used they will not be included in the info collected). Then option 2 to print the reports desired.
    0 pointsBadges:
    report
  • Christina
    SBMJOB CMD(DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*LIB) OUTPUT(*PRINT)) This will run as a batch job and produce a spooled file. You could also create an output file and query it to get the info you need. When I tested this it was complete in about 3 seconds.
    0 pointsBadges:
    report
  • Sloopy
    DSPOBJD will not work. It only shows the size of the library object, which does not include the objects in the library. The library object contains pointers to and information on the objects 'contained' in the library, so it gets bigger as more objects are added to the library. As an example, my WORKBENCH (tool) library size using DSPOBJD is 679,936 bytes. But the DSPLIB print shows a total size for the objects 'in' the library of 71,991,296 bytes.
    2,195 pointsBadges:
    report
  • Jaicee
    If you just want to know the size of the library and all of its objects (i.e. you don't need it in a program), you can use the iSeries Navigator. Drop down File Systems/Integrated File System/QSYS.LIB Then right-click on the library you want the size of and click Properties. It will take a few seconds for the total to sum up, but you will have your answer. If you need to do this in a program then you'll have to user the DSPOBJD command. Run it twice: To get the size of the library: dspobjd obj(your_lib) objtype(*lib) output(*outfile) outfile(qtemp/dspobjd) outmbr(*first *replace) To get the size of all objects in the library: dspobjd obj(your_lib/*all) objtype(*all) output(*outfile) outfile(qtemp/dspobjd) outmbr(*first *add) Then you could use SQL to get the total size: select sum(obobsz) from dspobjd or, there may be an API that would make it easier.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: