Skip to main content

Get Notified When Nearing the Maximum Number of Spooled Files

In this i Can blog post, IBM i expert Dawn May explains how to get notified when approaching your system's maximum number of spooled files.

An issue I encounter more frequently than I should is systems with a very large number of spooled files. This is a concern because IBM i has an upper limit on the number of spooled files. IBM i creates spooled output all the time, if for no other reason than job logs. If you hit this limit, the system encounters all sorts of problems, which essentially causes a system outage.
The maximum number of spooled files in the system ASP and basic user APSs is about 2.6 million, and this is the limit to be aware of. If you store spooled files in independent ASPs, the limit is 10 million-plus spooled files in each IASP. The spooled file limits are documented under the Work management limits in the Maximum capacities section of the IBM documentation.
Knowing system limits is helpful, but it’s even more useful to know how close you are to hitting the limit. The system health services can be used to identify what limits the system tracks as well as the ability to query the system to determine how close you are to the limit of interest. The maximum number of spooled files for both the system ASP and IASPs are tracked. 

The simple query below will show you the most recent tracked limit for the maximum number of spooled files in the system and basic user ASPs:

select * from qsys2.syslimits where limit_ID = 19002 order by last_change_timestampdesc;

Limit ID of 19003 will show the same information for spooled files in IASPs.

Knowing how close you are to the limit is nice, and now you can automatically be notified if you are getting close to the limit. SQL7062 is sent to the QSYSOPR message queue for a small number of system limits, one of which is the maximum number of spooled files in the system and basic user ASPs. Once a day, when Collection Services is cycled, a check is made to see if the limits are at the threshold level, and if so, SQL7062 is sent. The default threshold is 90% of the maximum.

You can also customize the threshold at which the alert is sent by setting up global variables. System limit alertsdocumentation describes the limits that have alerting enabled as well as how to customize the threshold.

The alerting for maximum spooled files was delivered this year in IBM i 7.4 PTF Group level 13 and IBM i 7.3 PTF Group level 24.


Stay on top of all things tech!
View upcoming & on-demand webinars →