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.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

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.

Type
*CHAR
Required
No
Default
*CNTRLD
Length
8
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/ENDWTR.json and os/cl/help/ENDWTR.json.