ENDWTR (End Writer)

ENDWTR Command syntax diagram

 

Purpose

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 it is ended immediately, the writer stops writing the file and the file is again available on the output queue. If it is 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, if it is a printer writer, before it is ended.

 

Required Parameters

WTR
Specifies the name of the spooling writer being ended. The writer's output device is available to the system.

*ALL: All writers that are started are ended.

*SYSVAL: The writer started to the system default printer is ended.

writer-name: Specify the name of the writer being ended.

 

Optional Parameters

OPTION
Specifies when the writer stops processing. Output stops at the end of the spooled file (or copy of a file) currently being written to an output device.

*CNTRLD: The job is ended in a controlled manner. This allows the program to perform cleanup (end-of-job processing).

Note: The spooled file that is currently being processed remains on the output queue. If the printer is a printer writer, printing stops and a form feed is done.

*IMMED: The operation ends immediately.

*PAGEEND: The writer is stopped after processing of the current buffer. This value is valid only if the spooling writer is a printer writer.

Example for ENDWTR

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.

Error messages for ENDWTR

*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.