Brief: There is a plethora of demands for disk space. It can be difficult to keep track of all the reasons disk space disappears so easily. This article gives you practical advice and discusses the tools available to keep your DASD utilization under control.
Ever go weak in the knees when your AS/400, loaded to the gills with state-of- the-art software, returns the message "storage threshold exceeded" and then locks up while you are in the middle of installing a PTF, an OS/400 release upgrade, or a new version of your applications? Left to its own devices, the AS/400 eventually seems to consume all the disk it has, even if your program and data libraries don't grow a byte. Without a doubt, the AS/400 is a wanton consumer of disk. Based on past experience, the older OS/400 gets, the more disk it will consume. Each release of OS/400 is significantly bigger than the previous one.
So what do you do with this DASD glutton? There are only two choices-regularly buy more disk (if you have the budget to do so), or manage what disk you have. I would like to focus on the second alternative. Granted, disk management takes time. But like many AS/400 tasks, knowing what to do and having a few key programs with which to do it can keep the time and frustration to a minimum.
While monitoring space on many systems over the past few years, I have developed a list of disk management techniques. The following suggestions have been distilled from articles in technical journals, IBM manuals, and Redbooks. Hopefully, the suggestions presented here will help you identify many of the space-consuming objects on your systems, and the preventive maintenance you should perform to avoid a very unpleasant experience. Many of these commands will require security administrator and spool control authority.
First, this article identifies some objects which consume space on your system. Second, it identifies some objects that need periodic attention. Third, it explains about Operational Assistant, and how you can save time and energy by adding some intelligence and flexibility to your cleanup scenario.
Deleting Unused Objects
The following recommendations suggest deleting certain licensed programs, libraries, and objects. Before you delete anything, be certain that your backups are current and that you have tested and verified your restore procedures.
By entering GO LICPGM, the system presents you with a number of licensed program options. To perform a save on a licensed program product, use option 13 (Save licensed programs). Your distribution tapes may be a sufficient backup, but you will have to apply PTFs to a licensed program if you restore it from the distribution tapes.
There are two other menu options of interest at this stage of the process: Option 11 (Install licensed programs) and Option 12 (Delete licensed programs). Use Option 11 to reinstall a deleted licensed program. Use Option 12 to remove the desired program products. Items you should consider for deletion include:
o Migration Aid-Library QMGU (the migration utility programs) and any other library name that starts with QMGU and is followed by six digits (migration work libraries). You should delete these libraries when the migration is complete and verified. You can also delete another set of objects left over from migration from a S/36 including source files QS36LOD and QS36DDSSRC, which contain work members created during migration and compilation, and the DFU source members from the QS36SRC files, which serve no useful purpose on the AS/400. These files will be found in your application program libraries.
o S/36 and S/38 environment support.
o Miscellaneous Libraries-Review all the libraries on your system. You can save and then delete unused or infrequently used user libraries.
o Source Files-You cannot remove your S/36 environment procedures or the source for sorts, but you can save all other source off-line or even on-line in a compressed save file.
o On-line education.
o Language dictionaries other than ones you actually use.
o Programming language related files such as previous release support (*PRV) for the compilers, any utility that is not at the current release level, and any compilers for languages you are not using. For example, S/36 and S/38 compiler support.
o PC Support options for OS/2 and DBCS, unless you are actually employing them in your installation.
o QUSRTOOL, but only after you have created the tools, as there are many programs that could be to your benefit.
In Appendix C of the Licensed Programs and New Release Installation Guide, you'll find a list of the available licensed programs and options. This list shows the space each program product requires on disk and the time required to install it. The time required to delete a program product is roughly the same as the time required to install it.
Periodic Cleaning
Once you've done the one-time cleanup discussed in the previous section, you're ready to address ongoing disk maintenance. Here are some suggestions.
First, IPL as frequently as you can. There is space tied up in system control areas, other temporary spaces, and unused spool file members that the system doesn't free up until the next IPL. The greater your percentage of space used, the more often you should perform an IPL. Every day if necessary.
Second, using the Reclaim Storage (RCLSTG) command, perform a general cleanup of auxiliary storage. You could expect to employ this option after an unexpected failure occurs (such as a power outage). The system, where possible, corrects corrupted objects (such as database files, libraries, device descriptions, and user profiles containing incorrectly recorded object ownership information). The system deletes any unusable objects or fragments.
Depending on the number and types of objects on the system, and the damage to them, this function could take considerable time to run. Eight hours or longer the first time it is run would not be uncommon. The more often you run the RCLSTG, the shorter the process will be.
RCLSTG is best run by QSECOFR and you will need a dedicated system. All subsystems must be inactive while it runs and it must run from the controlling subsystem.
System Housekeeping
For data related to IBM's problem-reporting process, use the Delete Problem (DLTPRB) command. The system stores problem data, including PTF data, in the QASX* files in QUSRSYS. You should not delete problem data until you've attended to the problem first.
Make sure that the System Delivered Education is not wasting space. The system stores education data in the QAE* files in QUSRSYS. In some cases, student bookmarks can take up to 1 megabyte (MB) of space. As you can well imagine, a lot of students can add up to a lot of space.
Delete network alerts once they have been handled. Your system receives alerts indicating network problems. After the problem has been resolved, use the Work with Alerts (WRKALR) command to delete these alerts. Alternately, all the alerts can be deleted and the space freed with the following command:
CLRPFM FILE(QUSRSYS/QAALERT) + MBR(QAALERT)
Clean up the many system files containing deleted records found in the library QUSRSYS using the Reorganize Physical File Member (RGZPFM) command. To see how many deleted records there are and how much space they occupy, run the following command:
DSPFD FILE(QUSRSYS/*ALL) + TYPE(*MBR) FILEATR(*PF)
Delete old performance data created by the Performance Tools. When you use the performance measurement tools, the system collects performance data in library QPFRDATA (or another, user-specified, library). You can delete performance data with the Start Performance Tools (STRPFRT) command or by clearing library QPFRDATA with the Clear Library (CLRLIB) command.
Delete save files after you load and apply PTFs. If you download PTFs using Electronic Customer Support (ECS), the system places PTFs in QGPL as save files. On earlier releases of OS/400, the save file name begins with "P" and is followed by the PTF number. On later releases, the system tags PTF save files as either QMFnnnnn or QSFnnnnn, where nnnnn is the PTF number. Before you delete PTF save files, make sure there are no user files in QGPL that conform to the delete combination you are requesting. Use the Work with Objects (WRKOBJ) command to see if there are other files, then delete just the PTF save files by executing one or more of the following commands:
DLTF FILE(QGPL/P*) DLTF FILE(QGPL/QMF*) DLTF FILE(QGPL/QSF*)
OfficeVision Housekeeping
Use the Reclaim Document Library Object (RCLDLO) when reclaiming DLOs, such as a single document, a folder, a folder and all documents, internal Document Library system objects, or all DLOs at once. To run RCLDLO, you may need *ALLOBJ or *SECADM authority. To maximize the effectiveness of RCLDLO, run it on a dedicated system because the system only reclaims DLOs that are not in use. If you cannot wait for a dedicated system and you encounter an error message that there are locked objects, retry the command after object activity has ended.
Save unused or infrequently used folders with the Save Document Library Object (SAVDLO) command, and then delete them from the system. Do not remove any IBM folders that have names starting with the letter Q.
You should periodically review folders and documents to decide whether to archive them. OfficeVision users can mark documents for off-line storage with options to delete the document, delete its content (equivalent to the free option with other objects), or keep the document.
Office users have mail and calendar entries. Make sure that users receive their mail and then file it or delete it. Unless you start the QSNADS subsystem, mail for indirect users will not print and thus will consume space on the system.
Calendar entries are deleted through the office administration option to work with Office files. Run the delete option against each calendar on the system specifying a date in the past before which calendar entries may be deleted. Deleting calendar entries just marks the calendar records as deleted, but does not actually remove the deleted records. The system stores office data, including calendar entries, in the QAO* files in QUSRSYS. To remove the calendar entries, either reorganize the QAO* files or use Operational Assistant, which will be discussed later.
With the steps outlined in these three sections, followed by a reorganize of all files in QUSRSYS, you will regain a reasonable amount of the excess space your AS/400 objects were consuming.
Daily To-do List
There are a number of areas of disk usage that you can look at frequently to ensure that you are not wasting disk capacity.
Review your unprinted spooled output and delete unneeded spooled files. Use the Work with Output Queue (WRKOUTQ) command to review all output queues. Deleting old spool files not only frees the space used by the spool file, but also allows the system to remove the job that created the spool file. Many of you have written your own routines to accomplish this task.
Review all job queues on your system to identify held jobs or jobs not submitted to an active subsystem. Using the Work with Job Queue (WRKJOBQ) command, review your job queues and end old jobs using Option 4 (End Job). You may find jobs submitted to job queues not attached to an active subsystem. You should transfer these jobs to a job queue attached to an active subsystem or end the job once you've determined if it's appropriate to run the job. For example, you don't want to run a month-end job that's three months old.
Look for those little accidents in the form of user-created objects that may have ended up in QGPL. Because it is the default library, simple mistakes by programmers can result in unneeded programs or files in QGPL. Use the following command to review the contents of QGPL and delete unnecessary objects.
WRKOBJ OBJ(QGPL/*ALL)
It's a good idea to back up library QGPL before deleting objects, in case you make a mistake and need to recover an object.
Operational Assistant
You can simplify the process of performing your system upkeep chores by taking advantage of OS/400's built-in Operational Assistant. To get there, type GO ASSIST from a command line. Operational Assistant makes it easy to manage those system objects that seem to grow and grow. (For more information on Operational Assistant, see "Operational Assistant Lends a Hand," MC, November 1992.)
Operational Assistant submits a cleanup job to a job queue of your choice where it waits until the specified time to run. To get to the Cleanup Tasks menu, select option 11 (Customized your system, users, and devices) from the ASSIST menu and then select option 2 (Cleanup tasks) from the SETUP menu. You can also key GO CLEANUP from a command line. For each category of objects, you can set the number of days (1 to 366) you want to keep the objects. The default time for the daily cleanup is 22:00:00, but you can designate any time for the routine to run.
Once you've specified a start time for cleanup, you can indicate what areas the system should clean up automatically. You can select up to five areas:
1. User messages. 2. System and workstation messages. 3. Job logs and other system output. 4. System journals and system logs. 5. OfficeVision calendar items.
The system removes messages sent to specific users that have been in the user's message queue longer than a given number of days. The default is seven days, but I recommend four days, which keeps user messages to a minimum but lets a user see messages received over the weekend. The system needs to obtain an exclusive lock on the message queue in order to clean it up. Thus, if the user is signed on, the message queue won't be cleaned up.
Messages that were sent to specific workstations or to QSYSOPR and that have been in the message queue longer than a given number of days are removed. The default is one day, but I recommend seven days, which affords a margin of safety. Once messages are deleted, you can't go back and see what happened on the system. Like user message queues, workstation and QSYSOPR message queues must not have any locks in effect in order to be cleaned up. If a particular workstation is signed on, the system won't clean up that workstation's message queue. The same is true for QSYSOPR.
When Operational Assistant's clean-up is first activated, the system changes printer files QPJOBLOG, QPSRVDMP, QPPGMDMP and QPBASDMP to ensure that their output goes to special output queues. That makes it easier to manage them. For job logs, the output queue is QUSRSYS/QEZJOBLOG. For all types of dumps, it's QUSRSYS/QEZDEBUG. These output queue changes remain in effect even when the cleanup operation is ended.
By default, job logs and dumps are deleted after seven days. If your programmers are on site, you may want to delete job logs and dumps every two or three days. However, if your programmers are off site, you may want to keep these objects longer.
The following list shows other objects that the system deletes when they are older than a given number of days. The default number of days is 30, but again, I recommend seven days or less if you do regular saves.
o Journal receivers for system journals QAOSDIAJRN, QDSNX, QSNADS, QSXJRN, QPFRADJ, and QACGJRN.
o History files (QSYS/QHST* files).
o Problem logs, provided that system value QPRBHLDITV allows it. The system then reorganizes the problem log database files in QUSRSYS: QASXCALL, QASXFRU, QASXNOTE, QASXPROB, QASXPTF, QASXYMP, and QASXEVT.
o Alert database entries. After deleting the entries, cleanup reorganizes database file QUSRSYS/QAALERT.
o Many PTF-related objects.
As Operational Assistant deletes old records, it also reorganizes files to free the space used by the deleted entries. Operational Assistant also reorganizes documents and database files used by OfficeVision.
Customizing Operational Assistant
You can customize the cleanup even beyond the options mentioned above by changing the IBM-supplied program QSYS/QEZUSRCLNP.
First you need to run the Retrieve CL Source (RTVCLSRC) command. This generates CL source code in a source physical file of your choice. The source file can be in any library. In order to avoid problems, select one of your own libraries rather than a system library such as QSYS. Assuming you have a source file QCLSRC in the library of your choice, you should run:
RTVCLSRC PGM(QSYS/QEZUSRCLNP) + SRCFILE(library-name/QCLSRC)
Next you will use SEU to insert the cleanup tasks you want to perform. For example, you could insert several Reorganize Physical File Member (RGZPFM) commands to reorganize your production database files. You could also use some of the examples previously cited in this article, such as removing PTF files or clearing performance data, or you can use your own previously written custom routines.
Finally, sign on as QSECOFR and run the Create CL Program (CRTCLPGM) command as follows to recompile QEZUSRCLNP.
CRTCLPGM PGM(QSYS/QEZUSRCLNP) + SRCFILE(library-name/QCLSRC) + USRPRF(*OWNER) REPLACE(*YES)
Since this program resides in the library QSYS, it's important for you to make a backup copy in another library, otherwise your changes may be overlaid during a release upgrade.
Neatness Counts
Automatic cleanup will relieve you from the tedium of having to start housecleaning chores yourself. Using a customized cleanup program, you can run your own additional space-saving routines, including any other tasks that Operational Assistant doesn't perform, such as deleting scratch libraries, deleting old spool files, and so on. In fact, you set the limit as to what automatic cleanup can do. You can benefit enormously by using automatic cleanup. You may even postpone a costly DASD upgrade when you find out how much space you have actually recovered.
To review, you first learned about those items that were consuming space and were no longer needed on our system. Second, you learned about some objects that needed a little more periodic attention (which would be good candidates to include in your customized cleanup job). Third, you learned a little bit about the Operational Assistant, and how you could save some time and energy by adding some intelligence and flexibility to your cleanup scenario.
An instant reformation? Well maybe not, but never again will you put yourself in such a compromising position. Get a handle on your DASD. Take nothing for granted. Except, maybe, the luck of the Irish.
Mark Cannon is an independent consultant with over 12 years of Information Systems experience. He can be reached through Midrange Computing.
REFERENCES
AS/400 Work Management Guide (SC41-8078, CD-ROM QBKA9J02).
Control Language Reference (SC41-0030, CD-ROM QBKA8202).
Licensed Program and New Release and Installation Guide (SC41-9878, CD-ROM QBKA3302).
Managing Office Vision/400 (SC41-9627, CD-ROM QBKA5102).
Operator's Guide (SC41-8082, CD-ROM QBKA9002)
LATEST COMMENTS
MC Press Online