Command reference / spool
CHGWTR
Change Writer
Changes the attributes of a printer writer that is already started: the output queue it takes spooled files from, the form type it selects, and the number of separator pages between files. The writer keeps running; the changes apply when it reaches a point where no file it is set up to print is waiting (OPTION *NORDYF) or when the file it is writing finishes (OPTION *FILEEND).
Allowed environments: *ALL.
Positional parameters: 2.
Parameters
WTR
Writer
Specifies the writer whose attributes are changed. This is a required parameter.
Suggested / special values:
*ALL, *PRT, *SYSVAL
*ALL- All writers are changed.
*PRT- All printer writers are changed.
*SYSVAL- The writer started to the system default printer (QPRTDEV) is changed.
OUTQ
Output queue
Specifies the output queue the writer takes spooled files from. The queue cannot already be assigned to another writer.
Suggested / special values:
*SAME, *DEV
*SAME- The current output queue is kept.
*DEV- The output queue named in the printer's device description 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)
Output queue
Output queue
Library
Library
Suggested / special values:
*LIBL, *CURLIB
FORMTYPE
Form type options
Specifies which form type the writer selects. Element 1 is the form type and element 2 is the message option that controls the inquiry and informational messages sent when a form type is needed or runs out.
Suggested / special values:
*SAME
*SAME- The current form type and message option are kept.
*ALL- The writer processes files of any form type.
*STD- The writer processes files with the standard form type.
*FORMS- The writer processes all waiting files of the form type in effect before changing form type.
*INQMSG- An inquiry message is sent when a file's form type differs from the writer's.
*MSG- An inquiry is sent when the form type differs, and an informational message when no files of that form type remain.
*NOMSG- No form type messages are sent.
*INFOMSG- An informational message is sent when no spooled files needing the form type remain.
Elements in order
Form type
Form type
Suggested / special values:
*SAME, *ALL, *STD, *FORMS
Message option
Message option
Allowed values:
*SAME, *INQMSG, *MSG, *NOMSG, *INFOMSG
FILESEP
File separators
Specifies the number of separator pages the writer prints before each spooled file, from 0 through 9.
Suggested / special values:
*SAME
OPTION
When to change writer
Specifies when the change takes effect.
Allowed values:
*NORDYF, *FILEEND
*NORDYF- The change takes effect when no spooled files of the form type the writer is processing remain on its queue.
*FILEEND- The change takes effect after the spooled file being written finishes printing.
MSGQ
Queue for writer messages
Specifies the message queue the writer sends its messages to.
Suggested / special values:
*SAME, *DEVD, *REQUESTER
*SAME- The current message queue is kept.
*DEVD- The message queue named in the printer's device description is used.
*REQUESTER- Messages go to the workstation message queue of the user who issued the command.
*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
Examples
CHGWTR WTR(PRT01) OUTQ(CIS001Q)
Moves printer writer PRT01 to output queue CIS001Q when the files of its current form type are all printed.
CHGWTR WTR(PRT01) FORMTYPE(LETTER *INQMSG) FILESEP(2)
Sets writer PRT01 to print form type LETTER, sends an inquiry message when a different form type is needed, and prints two separator pages before each file.
Generated from os/cl/catalog/CHGWTR.json and os/cl/help/CHGWTR.json.