January 11

0 comments

IBM Tips on Cleaning Up QSPL Storage

By NickLitten

January 11, 2024

housekeeping, QSPL

IBM Tips on Cleaning Up QSPL Storage

To manage and clean up QSPL storage on IBM i systems effectively, here are some best practices:

  1. Do Not Delete Physical Files or Members in QSPL: It’s crucial not to delete any physical files or members in the QSPL library as it could result in the loss of spooled files and require an IPL (Initial Program Load) to recover.
  2. Use CLROUTQ Command: Employ the Clear Output Queue (CLROUTQ) command to remove old job logs and system dumps from output queues like QEZJOBLOG and QEZDEBUG.
  3. Work with Output Queues (WRKOUTQ): Use the WRKOUTQ command with the OUTQ parameter set to *ALL to identify output queues with a large number of spooled files and clear them if they are no longer needed.
  4. Set Expiration Dates: Change or override printer files to specify expiration dates for spooled files using the CHGPRTF or OVRPRTF commands, and periodically run the DLTEXPSPLF command to delete expired spooled files.
  5. Reclaim Spool Storage (RCLSPLSTG): If you have recurring jobs that generate a large number of spooled files, use the RCLSPLSTG command after the next job cycle to clean up unused database members.
  6. Regular Deletion of Old Spooled Files: Keep the QSPL library small by periodically deleting old spooled files with the DLTSPLF or CLROUTQ commands³.

IBM offers some great advice:

Consider changing or overriding your printer files to specify the Expiration date for file (EXPDATE) and Days until file expires (DAYS) parameters, and running the Delete Expired Spooled Files (DLTEXPSPLF) command periodically to delete spooled files that have reached their expiration date.

The Expiration date for file (EXPDATE) parameter defaults to *NONE, so typically no expiration date is set. However,the Expiration date for file (EXPDATE) and Days until file expires (DAYS) parameters can be set prior to generating spooled files by using the Change Printer File (CHGPRTF) or Override with Printer File (OVRPRTF) commands. For example:

CHGPRTF FILE(QPJOBLOG) EXPDATE(*DAYS) DAYS(30)
OVRPRTF FILE(QPJOBLOG) EXPDATE(*DAYS) DAYS(30) OVRSCOPE(*JOB)

These parameters can also be set or changed after a spooled file has been generated by using the Change Spooled File Attributes (CHGSPLFA) command or by taking Option 8 (Attributes) from the Work with Spooled Files (WRKSPLF) or Work with Output Queue (WRKOUTQ) commands.

The only way to clean up after deleting QSPL files or members and to have the output queues accurately list the spooled files that are still on the system is to IPL the system. If an IPL is not possible, running STRSPLRCL might help prevent some spooling and printing failures. However, STRSPLRCL does not fix up everything needed to recover from deleting a file or member.

STRSPLRCL OUTQ(*ALL) ASPGRP(*)
IBM Support

By following these tips, you can help ensure that your IBM i system’s QSPL storage is managed efficiently and remains free of unnecessary clutter.

Obviously, always have a backup of your system before performing any cleanup activities.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>