Link to home
Start Free TrialLog in
Avatar of Bsidmis
BsidmisFlag for India

asked on

How to get the size of a Library in AS400

How can I get the size of a Library in AS400

For example in case of a physical file using DSPFD & output (*OUTFILE) we can get the size of that particular physical file that means the number of records present in that particular Physical file.

In the same way can we get the size of a particular library that means the number of objects present in that library by any other process.

Thanking You

Avatar of Member_2_276102
Member_2_276102

Bsidmis:

A general proc to retrieve library size can be studied here:

http://home.earthlink.net/~tliotta/Files/Show_Library_Size/Show_Library_Size_README.htm

In general, the Retrieve Library Description (QLIRLIBD) API is called and the total 'size' of the objects contained in the library is returned. (The example also retrieves the count of objects in the library.)

For a bit more info, the example also uses the RTVOBJD command to retrieve the size of the library object itself. The library object may get quite large as it encapsulates a list of the objects within it among other things.

Details can be discussed as you need them.

Tom
Avatar of Bsidmis

ASKER

Hi Tom,
I have tried with that QLIRLIBD but I didnt got how to use that actually.
So, I'm not getting the result.
Can you please send me a sample program for my understand purpose.
Thanking You
Bsidmis:

What version/release of i5/OS are you running? Using pre-V5R3 OS/400 would mean a less sophisticated example, and V5R4 or later could mean much nicer.

Tom
Avatar of Theo Kouwenhoven
Hi Bsidmis,

What about DSPOBJD ? this gives the object size (also for a library)

Regards,
Murph
Avatar of Bsidmis

ASKER

Hi Tom,
We are using V5R4 version
can you please give me an example for this?
Also how can I get the size of each  library present in the server individually at a time?  
Help me in this also please.
Thanking you  
Avatar of Bsidmis

ASKER

Hi Murph,
By using DSPOBJD I'm getting the size of individual objects only but not the size of the complete Library.
Using that command how can i get the Size of Whole Library ?
And Please tel me this also....How can I get the size of each library present in the server individually that too at a time.
Thanking you
SOLUTION
Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Murph:

An *outfile from a command needs a record format. This typically requires determining what the format looks like so you can compile over it. And that typically involves locating the IBM model file and setting up overrides to handle the real eventual file I/O. And the eventual I/O typically involves reading multiple records, summation, handling EOF (plus file errors, data types, format changes in future releases), or learning SQL and the execution of it.

IMO, it's just as easy to call an API and grab the values directly. Just opinion, but we might forget how much has gone into the learning we all did over the years for *outfiles.

Tom
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bsidmis

ASKER

Thank you for replying me
I got the solution for my question & I got the appropriate result for that.