Command reference / spool
ENDWTR
End Writer
Ends the specified spooling writer and makes its output device available to the system. The writer can be ended immediately, in which case the file being written stays available on the output queue, or in a controlled manner, in which case it finishes the current file (or copy) or the current page before ending.
Allowed environments: *ALL.
Positional parameters: 2.
Parameters
WTR
Writer
Specifies the spooling writer being ended, so that its output device becomes available to the system. This is a required parameter.
Suggested / special values:
*ALL, *PRT, *RMT, *SYSVAL
*ALL- All writers are ended.
*PRT- All printer writers are ended.
*RMT- All remote writers are ended.
*SYSVAL- A writer started to the system default printer (the QPRTDEV system value) is ended.
OPTION
When to end writer
Specifies when the writer should stop processing.
Allowed values:
*CNTRLD, *IMMED, *PAGEEND
*CNTRLD- The writer stops in a controlled manner at the end of the spooled file (or copy) currently being written.
*IMMED- The writer stops immediately. The spooled file that is printing remains on the output queue.
*PAGEEND- The writer stops after the current buffer is processed. Valid only for printer writers.
Examples
ENDWTR WTR(PRINTER) OPTION(*CNTRLD)
Stops the writer named PRINTER at the end of the spooled file being printed, then releases the device to the system.
ENDWTR WTR(*PRT) OPTION(*IMMED)
Ends all printer writers immediately. Remote writers are not affected.
Generated from os/cl/catalog/ENDWTR.json and os/cl/help/ENDWTR.json.