End Writer (ENDWTR)

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

Parameters

Keyword Description Choices Notes
WTR Writer Name, *SYSVAL, *ALL Required, Positional 1
OPTION When to end writer *CNTRLD, *IMMED, *PAGEEND Optional, Positional 2
Top

Writer (WTR)

Specifies the spooling writer being stopped. The writer's output device will then be available to the system.

This is a required parameter.

*ALL
Specifies that all writers that are started are to stop.
*SYSVAL
Specifies that the writer started to the system default printer is to stop.
name
Specify the name of the writer to end.
Top

When to end writer (OPTION)

Specifies when the writer should stop processing.

*CNTRLD
The spooling writer stops processing in a controlled manner. Output stops at the end of the spooled file (or copy of a file) currently being written to an output device.
*IMMED
The writer stops processing immediately. The spooled file that is currently printing remains on the output queue.
*PAGEEND
The writer is stopped after processing of the current buffer. This value is valid only if the spooling writer is a printer writer.
Top

Examples

ENDWTR   WTR(PRINTER)

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.

Top

Error messages

*ESCAPE Messages

CPF1317
No response from subsystem for job &3/&2/&1.
CPF1340
Job control function not performed.
CPF1352
Function not done. &3/&2/&1 in transition condition.
CPF1842
Cannot access system value &1.
CPF3313
Writer &1 not active nor on job queue.
CPF3330
Necessary resource not available.
CPF3331
Not authorized to control writer &3/&2/&1.
CPF3339
Previous end request to writer &3/&2/&1 pending.
CPF3438
*PAGEEND not valid for writer &3/&2/&1.
Top