Hold Writer (HLDWTR)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Hold Writer (HLDWTR) command stops the specified writer at the end of a record, at the end of a spooled file, or at the end of a printed page. If multiple copies of a file are produced, the writer can be held at the end of the copy currently being produced. The writer is not stopped and the device is not made available to the system. The writer remains inactive until a Release Writer (RLSWTR) or End Writer (ENDWTR) command is issued. Data is not lost when the writer is held.

Top

Parameters

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

Writer (WTR)

Specifies the spooling writer being held.

This is a required parameter.

name
Specify the name of the writer to be held.
Top

When to hold writer (OPTION)

Specifies when the spooling writer should stop producing output.

*IMMED
The writer stops immediately after it has written the last record, in the current block of records, to the output device. Each time the writer finishes producing a block of records on a device, it makes another I/O request to get the next block from the file being spooled to the device. If *IMMED is specified, the writer stops only after it has written the last record in the block being processed, which (for diskette output) is a complete diskette record being written on diskette.

When *IMMED is specified for printed output, the writer stops anywhere within or at the end of a print line or at the end of a complete block, which may not be at the end of a line. This is because some data records (which are blocked to improve performance) may be split in two, with the first part of a record at the end of one block and the last part of the record at the beginning of the next block. If only one copy of the file is being produced or if the last copy is being produced, the entry for the file is removed from the output queue when the output is completed.

*CNTRLD
The writer stops at the end of the current copy of the file. If only one copy of the file is to be produced or if the last copy is being produced, the entry for the file is removed from the output queue when the output is completed.
*PAGEEND
The writer is held at the end of a page. This value is valid only when the spooling writer is a printer writer.
Top

Examples

HLDWTR   WTR(PRINTER)  OPTION(*CNTRLD)

This command stops the writer named PRINTER at the end of the current file. The writer is held until an RLSWTR (Release Writer) or ENDWTR (End Writer) command is issued.

Top

Error messages

*ESCAPE Messages

CPF1340
Job control function not performed.
CPF3313
Writer &1 not active nor on job queue.
CPF3330
Necessary resource not available.
CPF3331
Not authorized to control writer &3/&2/&1.
CPF3332
Writer &3/&2/&1 already held.
CPF3334
Previous hold to writer &3/&2/&1 pending.
CPF3438
*PAGEEND not valid for writer &3/&2/&1.
Top