| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The End Writer (ENDWTR) command ends the specified spooling writer and makes its associated output device available to the system. The writer can be ended immediately or in a controlled manner. If ended immediately, the writer stops writing the file and the file is made available again on the output queue. If ended in a controlled manner, the writer finishes writing the current file (or a copy of a file), or it finishes printing a page of the file, before it is ended.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| WTR | Writer | Name, *ALL, *PRT, *RMT, *SYSVAL | Required, Positional 1 |
| OPTION | When to end writer | *CNTRLD, *IMMED, *PAGEEND | Optional, Positional 2 |
| Top |
Specifies the spooling writer being ended. The writer's output device will then be available to the system.
This is a required parameter.
| Top |
Specifies when the writer should stop processing.
| Top |
Example 1: End a specific writer
ENDWTR WTR(PRINTER) OPTION(*CNTRLD)
This command stops the writer named PRINTER at the end of the spooled file whose output is being printed, and then releases the device to the system.
Example 2: End all the printer writers immediately
ENDWTR WTR(*PRT) OPTION(*IMMED)
This command ends all the printer writers immediately. Remote writers are not affected.
| Top |
*ESCAPE Messages
| Top |