Spooled files are IBM i printer output waiting on output queues. Reports, job logs, invoices and labels can all sit there before a writer prints or sends them.
This page is a command lookup for finding, displaying, holding, releasing, moving and deleting spooled files. For the concept-level explanation, read IBM i Output Queues and Spool Files Explained.
Quick command map
| Task | Command | Changes something? |
|---|---|---|
| List spooled files | WRKSPLF | Display is read-only; options can change files |
| Work an output queue | WRKOUTQ | Display is read-only; options can change files or queue |
| Display a spooled file | DSPSPLF | No |
| Change spooled-file attributes | CHGSPLFA | Yes |
| Hold or release a spooled file | HLDSPLF, RLSSPLF | Yes |
| Delete a spooled file | DLTSPLF | Yes |
| Hold or release an output queue | HLDOUTQ, RLSOUTQ | Yes |
| Start or end a writer | STRPRTWTR, ENDWTR | Yes |
WRKSPLF
WRKSPLF lists spooled files. Start here when a user says “my report did not print.”
WRKSPLF
WRKSPLF SELECT(USER1)
WRKSPLF SELECT(*CURRENT *ALL *ALL)
Filter by user, job, file name, output queue or form type when the list is large. The list is inspection until you take an option such as display, hold, release, change or delete.
WRKOUTQ
WRKOUTQ works with files on one output queue.
WRKOUTQ OUTQ(QPRINT)
WRKOUTQ OUTQ(MYLIB/INVOICES)
Use it when the question is queue-centered: many files are waiting, a writer is stopped, or output is held on a particular queue.
DSPSPLF
DSPSPLF displays the contents of a spooled file.
DSPSPLF FILE(QPJOBLOG) JOB(123456/USER/JOBNAME)
Use it to inspect a job log or report without printing. Security settings on the output queue can restrict who may display spooled-file data.
CHGSPLFA
CHGSPLFA changes spooled-file attributes such as output queue, number of copies, hold status or save attribute.
CHGSPLFA FILE(INVOICE) JOB(123456/USER/JOBNAME) OUTQ(PRTLIB/PRT01)
CHGSPLFA FILE(INVOICE) JOB(123456/USER/JOBNAME) COPIES(2)
Changing a spooled file affects real output. Confirm the file, job and queue before changing attributes.
The file-specific examples omit SPLNBR and therefore rely on its *ONLY default: exactly one spooled file with that name must exist in the selected job. If the job has duplicates, add SPLNBR(n) using the actual file number from WRKSPLF. Do this for display, change, hold, release and delete commands; never guess a number or use the latest file as a substitute for identifying the intended output.
HLDSPLF and RLSSPLF
Hold a spooled file when it should not print yet. Release it when it is ready.
HLDSPLF FILE(INVOICE) JOB(123456/USER/JOBNAME)
RLSSPLF FILE(INVOICE) JOB(123456/USER/JOBNAME)
Holding one spooled file is narrower than holding the entire output queue.
DLTSPLF
DLTSPLF deletes a spooled file.
DLTSPLF FILE(TESTRPT) JOB(123456/USER/JOBNAME)
Delete only when the output is no longer needed. Job logs and reports can be operational evidence.
HLDOUTQ and RLSOUTQ
These commands affect the queue.
HLDOUTQ OUTQ(MYLIB/INVOICES)
RLSOUTQ OUTQ(MYLIB/INVOICES)
Use them for queue-level control, such as stopping all files from printing while a printer problem is investigated. They affect more than one user’s output.
Troubleshooting patterns
| Symptom | Check |
|---|---|
| Report not printed | WRKSPLF for the user and WRKOUTQ for the queue |
| Job ended but no log visible | Look for QPJOBLOG in the job’s spooled files |
| File is on wrong printer | CHGSPLFA OUTQ(...) after confirming destination |
| File is waiting | Check hold status, output queue status and writer status |
| User cannot see output | Output queue security, owner, DSPDTA and authority |
| Too many old files | Review retention policy before deleting |
IBM’s security documentation ties output-queue parameters, queue authority and special authority together. Be careful with broad spool-control authority. Spooled files can contain confidential data.
Common mistakes
- Deleting a job log before the failure is understood.
- Holding an entire output queue when one spooled file should be held.
- Changing output queue or copies on the wrong duplicate file.
- Assuming every operator can display confidential spooled-file data.
- Forgetting that
WRKSPLFandWRKOUTQoptions can change or delete output. - Releasing output before checking forms, printer and queue destination.
Output queue versus spooled file
Choose the narrowest action that solves the problem.
| Need | Prefer |
|---|---|
| Stop one report from printing | HLDSPLF |
| Let one held report print | RLSSPLF |
| Move one report to another queue | CHGSPLFA OUTQ(...) |
| Stop everything on a queue | HLDOUTQ |
| Resume a queue after maintenance | RLSOUTQ |
| Remove one unneeded output item | DLTSPLF |
Queue-level commands can affect many users. File-level commands are safer when the problem is one report, one job log or one test print.
Security notes
Output is data. A spooled file may contain payroll, invoices, customer addresses or job diagnostic details. Before changing access, check who owns the output, which output queue holds it, and whether the queue permits display of spooled-file data.
For operations context, see IBM i System Operations with CL. For job-log output specifically, use the IBM i Job Log and CPF Messages Reference.
FAQ
Why can I see a spooled file but not display it?
The output queue security settings can allow listing while restricting display of the actual data. Owner and special authority rules can also apply.
Should I hold the queue or the file?
Hold the file when only one output item is the problem. Hold the queue when the printer, writer, forms or destination affects all files waiting there.
Is DLTSPLF safe for old job logs?
Only after retention and incident needs are satisfied. A job log can be the only evidence of why a batch process failed.
Before changing or deleting output
Use a quick evidence check before any mutating command.
| Check | Reason |
|---|---|
| File name and number | A job can create multiple spooled files with the same name |
| Job name, user and number | Prevents action against another user’s output |
| Output queue | Confirms the current destination |
| User data and form type | Helps identify the business report |
| Creation date and time | Separates the latest run from an older run |
| Save attribute | Determines whether output remains after printing |
If the output belongs to a failed job, inspect the job log before deleting it. If it is customer-facing output, confirm whether the business process has already reprinted or resent it.
Writer checks
When a queue has ready output but nothing prints, check the writer and device before changing every file. A held writer, varied-off device, forms mismatch or message wait can stop output even when the spooled files themselves are ready. Queue-level commands are useful after you know the problem is queue-wide.
Summary
- Use
WRKSPLFfor a user’s or job’s output andWRKOUTQfor queue-centered work. - Use
DSPSPLFto inspect output without printing. - Treat
CHGSPLFA,HLDSPLF,RLSSPLF,DLTSPLF,HLDOUTQandRLSOUTQas operational changes. - Preserve job logs and business reports until the incident or retention need is resolved.