Logo: TUG TORONTO USERS GROUP for Midrange Systems
TUG
e -server magazine

March 1996: Volume 11, Number 4


How much DASD is USED by Shared Folders and Documents?

By Debbie Gallagher

n the January 1996 issue, I wrote about how to create a storage report which shows how much DASD is used by each library on your AS/400. If your report showed a lot of DASD used by library QDOC, you may have used DSPLIB to find out what was there. If so, were you puzzled by the object names you saw?
DASD

What Is In Library QDOC?

Library QDOC is used for shared folders and documents. The object types are reasonably clear: *FLR for folders and *DOC for documents. The object names, however, are a system-generated series of letters and numbers. For example, ABCD123456. The names of folders and documents as assigned by your users are not shown. None of the objects has a text description.

You can get folder and document names along with size information in one of two ways. The two options are outlined separately below,

I. USE GO DISKTASKS

Use command GO DISKTASKS to get to the DISKTASKS menu and then Option 1. Collect Disk Space Information (RTVDSKINF) to collect information. The RTVDSKINF command will output information on all objects on the system (not just documents and folders) to file QAEZDISK in library QUSRSYS.

Remember to have QSECOFR or another profile with *ALLOBJ authority submit this job or add it as a job schedule entry, so that you don't miss reporting on large and interesting documents due to insufficient authority. Use the RTVDSKINF option in an off-hours time slot, to avoid losing information on objects in use, and to avoid the accusation that you are hogging resources.

Create Reports

Then you can use Option 2. Print Disk Space Information (PRTDSKINF) on the same menu. The PRTDSKINF command allows you to create custom reports, so you can select only library QDOC if you want, or select only documents greater than a specified size if you choose.

If you prefer a different format for reporting, you can create a query based on file QUSRSYS/ QAEZDISK, to provide whatever information you need.

II. USE QRYDOCLIB

If you don't want to use the DISKTASKS menu options, you can create shared folder and document information using command QRYDOCLIB. For example:


QRYDOCLIB DOCL(*NONE) OUTFILE(mylib/myfile) 
USRID(QSECOFR QSECOFR).

Document List

In the above example, I specified DOCL(*NONE), in order to suppress creation of a system-generated document list. If you do not specify *NONE, you will have to remember to remove the old document lists periodically.

Authority for QRYDOCLIB

Ensure that you have sufficient authority to get information on all of the folders and documents. When using the command QRYDOCLIB, the AS/400 will provide information only on documents and folders you are authorized to see.

The security officer probably won't want to give you the QSECOFR password every time you want to use command QRYDOCLIB.

Instead, create a command and command-processing program that adopt QSECOFR authority. Create a new command and command-processing program, called, for example, ALLDOCS. Have the security officer compile these new objects with USRPRF(*OWNER), and make the owner QSECOFR.

When you use the command ALLDOCS, you will get all folder and document descriptions reported, but will not have permanent access to them or their contents.

User Permission

In the command-processing program ALLDOCS, you will have to grant permission to the user running the report to get all documents and folders before using command QRYDOCLIB. Use the command GRTUSRPMN TOUSER(user) FORUSER(QSECOFR).

At the end of the program, remember to revoke the user permission granted earlier, even if the program ends abnormally. Use the command:


RVKUSRPMN FROMUSER(user) FORUSER(QSECOFR)

Create Reports

Now that you have a file with information on every folder and document, you can use query to summarize by folder, or to sort by size, or to select folders or documents of a certain size and print reports.

Now What?

Now you have reports to review with your users, and can ask them if any of the documents have been forgotten and are no longer needed. Perhaps you can even persuade them to remove a few documents! T < G