26
Fri, Apr
1 New Articles

Disk Space Management

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

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)

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: