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.
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.
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
Library
Library
Suggested / special values:
*LIBL, *CURLIB
WTR
Writer
Specifies the name of the spooling writer being started. Each writer name must be unique.
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.
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
Library
Library
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.
*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
Allowed values:
*NO, *YES
If yes, when to end
If yes, when to end
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.
*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
Suggested / special values:
*ALL, *STD, *FORMS
Message option
Message option
Allowed values:
*INQMSG, *MSG, *NOMSG, *INFOMSG
FILESEP
File separators
Suggested / special values:
*FILE
SEPDRAWER
Drawer for separators
Suggested / special values:
*DEVD, *FILE
ALWDRTPRT
Allow direct print
Allowed values:
*NO, *YES
ALIGN
Align page
Specifies how forms alignment is controlled.
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
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.
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
Suggested / special values:
*
Qualified parts (object, then library; write LIBRARY/OBJECT)
Job name
Job name
User
User
Number
Number
SPLNBR
Spooled file number
Suggested / special values:
*ONLY, *LAST, *ANY
JOBSYSNAME
Job system name
Suggested / special values:
*ONLY, *CURRENT, *ANY
CRTDATE
Spooled file created
Suggested / special values:
*ONLY, *LAST
Elements in order
Creation date
Creation date
Creation time
Creation time
Suggested / special values:
*ONLY, *LAST
PAGE
Starting page
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.
Generated from os/cl/catalog/STRPRTWTR.json and os/cl/help/STRPRTWTR.json.