ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Report of all library sizes

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Report of all library sizes

    Hi,

    I would like to create a report that I could run at anytime which would display library sizes in bytes.

    I'm having trouble because DSPOBJD isn't an accurate size.

    Any help would be grateful.

    Thanks,

    Adam

  • #2
    Re: Report of all library sizes

    i'm sure there's a better way but i don't have time to look for it. DSPOBJD *LIB to an outfile read thru that file executing a DSPLIB to *PRINT and the final total has the correct size for the library + it's objects. you can parse out that data from the spooled file, etc.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: Report of all library sizes

      I have a version somewhere i'll try to find it..
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: Report of all library sizes

        You can use the RTVDSKINF and PRTDSKINF commands to do this.

        As for why the object size is not showing what you expect:

        The size of the library object shown does not include the sizes of the objects in the library. The total size of the library, including the sizes of the objects in the library, can be obtained using the Display Library (DSPLIB) command with OUTPUT(*PRINT) or the Retrieve Library Description (QLIRLIBD) API.

        Your assuming that the library object contains the objects within the library, ie. an Object containing an object.

        Comment


        • #5
          Re: Report of all library sizes

          Their used to be an IBM command PRTLIBSIZ that let you sort by size or name. And it also showed the largest object in each lib. Maybe it's still around.
          "Time passes, but sometimes it beats the <crap> out of you as it goes."

          Comment


          • #6
            Re: Report of all library sizes

            Or, just run the following command from an SQL Prompt (or add to your favorite Language)

            Code:
            Select Cast( Name as Char(15) ) as Library,  
                   Cast( Owner as Char(25) ) as Owner,   
                   Size
              From QSYS2.SYSSchemas
            Order by Name
            [EDIT - Though not at V5R3 & v5r4]
            Last edited by jamief; May 10, 2011, 04:55 AM. Reason: V5R3 & V5r4

            Comment


            • #7
              Re: Report of all library sizes

              Originally posted by adam400
              I would like to create a report that I could run at anytime which would display library sizes in bytes.
              I'm having trouble because DSPOBJD isn't an accurate size.
              I don't think this is that practical. As your title suggests this is for ALL libraries. Our system here has 55TB cracking on it and displaying this report on demand for all the data and libraries would take some time. Thereby making the on demand idea a bit implausible.

              Settle for a nightly report that shows what happened since yesterday, or filter the library selection. If your libraries are labeled by function (eg TECH* for technical libs, OPS* for operator required stuff, CFG* for config stuff etc) then it will be easier to filter the report on a library prefix (TECH*) and get that info quicker than doing for all.
              Greg Craill: "Life's hard - Get a helmet !!"

              Comment


              • #8
                Re: Report of all library sizes

                could someone post the DDS for OBJL0500 for QUSLOBJ from qsysinc... I dont have it installed.

                PRTLIBSIZ is not IBM its from Ernie Malaga posted way back in 1991 on mcpress

                (their new site which I believe is joomla based is a mess -- I know mines not any better, but @#%@#%@#%@#% they have a staff)


                thanks
                Jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: Report of all library sizes

                  here it is
                  Attached Files
                  I'm not anti-social, I just don't like people -Tommy Holden

                  Comment


                  • #10
                    Re: Report of all library sizes

                    Originally posted by jamief
                    (their new site which I believe is joomla based is a mess -- I know mines not any better, but @#%@#%@#%@#% they have a staff)
                    yes, to say less worse ... And the D/L links are dead since they "reorganized" their site.
                    Philippe

                    Comment


                    • #11
                      Re: Report of all library sizes

                      Just wanted to come back and upload this. It's a save file containing Ernie's original code from April 1991 issue of the magazine. (I hope I don't get in trouble for this!)
                      Attached Files
                      "Time passes, but sometimes it beats the <crap> out of you as it goes."

                      Comment

                      Working...
                      X