Command reference / spool

STRPRTWTR

Start Printer Writer

Starts a spooling writer on the specified printer. The writer is a system job that takes spooled files from an output queue and writes them to the printer, and the command sets the printer, output queue, message queue, and writer name. Up to 10 writers can be active on one output queue, each with a unique name and its own device. A started writer can be changed, held, or ended with CHGWTR, HLDWTR, or ENDWTR, and it runs independently of the job that started it.

Allowed environments: *ALL. Positional parameters: 5.

Parameters

DEV Printer

Specifies the printer device used to print the spooled file. The device must be available before the writer can start. This is a required parameter.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

Suggested / special values: *ALL, *SYSVAL

*ALL
Starts a writer for every printer configured on the system.
*SYSVAL
Starts a writer for the system default printer.

OUTQ Output queue

Specifies the output queue from which the writer processes spooled files.

Type
*QUAL
Required
No
Default
*DEV
Case
Uppercase

Suggested / special values: *DEV

*DEV
Uses the default output queue associated with the printer.
*LIBL
All libraries in the thread's library list are searched until the first match is found.
*CURLIB
The job's current library is used; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Output queue Output queue

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

WTR Writer

Specifies the name of the spooling writer being started. Each writer name must be unique.

Type
*NAME
Required
No
Default
*DEV
Length
10
Case
Uppercase

Suggested / special values: *DEV

*DEV
The writer name is the same as the printer device name.

MSGQ Queue for writer messages

Specifies the message queue used for writer messages.

Type
*QUAL
Required
No
Default
*DEVD
Case
Uppercase

Suggested / special values: *DEVD, *REQUESTER

*DEVD
Messages go to the message queue named in the printer's device description.
*REQUESTER
Messages go to the workstation message queue of the user who started the process; for batch jobs, *DEVD is used.
*LIBL
All libraries in the thread's library list are searched until the first match is found.
*CURLIB
The job's current library is used; if none is set, QGPL is used.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Queue for writer messages Queue for writer messages

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

AUTOEND Auto-end options

Specifies whether the writer ends automatically. Element 1 is yes or no; element 2 is when to end if yes.

Type
*ELEM
Required
No
Case
Uppercase
*NO
The writer waits for another spooled file entry after the queue empties.
*YES
The writer ends automatically at the point set by element 2.
*NORDYF
The writer ends when no ready files remain on the output queue.
*FILEEND
The writer stops after it finishes one spooled file.
Elements in order

Automatically end writer Automatically end writer

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

If yes, when to end If yes, when to end

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

Allowed values: *NORDYF, *FILEEND

FORMTYPE Form type options

Specifies which form type the writer selects to print; other files stay on the queue. Element 1 is the form type and element 2 is the message option.

Type
*ELEM
Required
No
Case
Uppercase
*ALL
All available files are processed regardless of form type.
*STD
Spooled files with form type *STD are processed.
*FORMS
All available files with the same form type are processed as a group before the writer moves to the next form type.
*INQMSG
An inquiry message is sent when a file's form type differs from the printer's form type.
*MSG
An inquiry is sent when the form type differs, and an informational message when no files for that form type remain.
*NOMSG
Neither an inquiry nor an informational message is sent.
*INFOMSG
An informational message is sent when no spooled files needing this form type remain on the queue.
Elements in order

Form type Form type

Type
*CHAR
Required
No
Default
*ALL
Length
50
Case
Uppercase

Suggested / special values: *ALL, *STD, *FORMS

Message option Message option

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

Allowed values: *INQMSG, *MSG, *NOMSG, *INFOMSG

FILESEP File separators

Type
*INT4
Required
No
Default
*FILE
Range
0 to 9
Case
Uppercase

Suggested / special values: *FILE

SEPDRAWER Drawer for separators

Type
*INT4
Required
No
Default
*DEVD
Range
1 to 255
Case
Uppercase

Suggested / special values: *DEVD, *FILE

ALWDRTPRT Allow direct print

Type
*CHAR
Required
No
Default
*NO
Length
4
Case
Uppercase

Allowed values: *NO, *YES

ALIGN Align page

Specifies how forms alignment is controlled.

Type
*CHAR
Required
No
Default
*WTR
Length
6
Case
Uppercase

Allowed values: *FILE, *WTR, *FIRST

*FILE
An alignment message is issued for every file that has alignment set to *YES on the printer file.
*WTR
The writer tracks output and issues alignment messages when it determines forms may need alignment.
*FIRST
An alignment message is issued only for the first file printed.

INIT Initialize printer

Type
*CHAR
Required
No
Default
*WTR
Length
6
Case
Uppercase

Allowed values: *WTR, *FIRST, *ALL

FILE Spooled file

Specifies the first (or only) spooled file to print. Without a name, the first file that becomes available is processed first.

Type
*NAME
Required
No
Default
*NONE
Length
10
Case
Uppercase

Suggested / special values: *NONE, *LAST

*NONE
No file is named; the first available file on the queue is processed first.
*LAST
The file being printed when the writer last ended starts again when the writer restarts.

JOB Job name

Type
*QUAL
Required
No
Default
*
Case
Uppercase

Suggested / special values: *

Qualified parts (object, then library; write LIBRARY/OBJECT)

Job name Job name

Type
*NAME
Required
No
Length
10
Case
Uppercase

User User

Type
*NAME
Required
No
Length
10
Case
Uppercase

Number Number

Type
*CHAR
Required
No
Length
6
Case
Uppercase

SPLNBR Spooled file number

Type
*INT4
Required
No
Default
*ONLY
Range
1 to 999999
Case
Uppercase

Suggested / special values: *ONLY, *LAST, *ANY

JOBSYSNAME Job system name

Type
*NAME
Required
No
Default
*ONLY
Length
10
Case
Uppercase

Suggested / special values: *ONLY, *CURRENT, *ANY

CRTDATE Spooled file created

Type
*ELEM
Required
No
Default
*ONLY
Case
Uppercase

Suggested / special values: *ONLY, *LAST

Elements in order

Creation date Creation date

Type
*DATE
Required
No
Case
Uppercase

Creation time Creation time

Type
*TIME
Required
No
Default
*ONLY
Case
Uppercase

Suggested / special values: *ONLY, *LAST

PAGE Starting page

Type
*INT4
Required
No
Default
*BEGIN
Case
Uppercase

Suggested / special values: *BEGIN

Examples

STRPRTWTR DEV(QSYSPRT) OUTQ(QPRINTS) WTR(TOM)

Starts a writer named TOM that prints output from output queue QPRINTS on printer QSYSPRT. Writer messages go to the system operator's message queue, and the writer waits for more output when the queue is empty.

IBM command documentation

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