Holding and Releasing Writers


STRPRTWTR and ENDWTR perform "hard" starts and stops because they start and end a job in subsystem QSPL. You can use the Hold Writer (HLDWTR) and Release Writer (RLSWTR) commands to temporarily suspend printing.

HLDWTR stops activity on the printer without ending the spool writer job in QSPL. Conversely, the RLSWTR command restarts printer activity without starting a new job in QSPL.

Changing Writers

Printer writers can be changed without having to end (ENDWTR) and restart them (STRPRTWTR) using the Change Writer (CHGWTR) command. The CHGWTR command has almost the same set of options provided by the STRPRTWTR command, so you don't need to end the writer and restart it if you want to change some of the options.

You can hold the writer instead, chasnge it, and then release it; or, you can change the writer "on the fly." For example, if the writer for printer SYSPRT01 is printing reports from output queue FRED, and you want to change it so it begins printing from output queue JUNK, run the following command:

      CHGWTR WTR(SYSPRT01) OUTQ(JUNK) 

Replying to Printer Messages

Printer writers also communicate printer problems to the system. For example, the printer might run out of paper, have a paper jam, or be presented with a report that is set to a different form type than the one currently installed.

In these situations, the writer doesn't know what to do, so it sends a message to indicate the problem. The message goes to whatever message queue you specified in the MSGQ parameter when you created the printer device description (QSYSOPR or something else).

The STRPRTWTR or CHGWTR commands can override that setting and force the writer to send the messages to a different message queue. You should not do this because it creates confusion.

Tip 

Under normal circumstances, new printer messages are not displayed automatically; you must run the Display Message (DSPMSG) command in order to see them.

For example, suppose that printer INVPRT01 stopped for no apparent reason. You suspect there is a problem and to confirm (or refute) your suspicion, you display messages for that printer. You have set up INVPRT01 so that its messages go to a message queue of the same name:

      DSPMSG MSGQ(INVPRT01) 

The message you need to reply to should be the last one, and should look something like the panel presented in Figure 5.7.

image from book
Figure 5.7: Working with a printer-specific message queue.

You can ask the system to explain the meaning of the message by moving the cursor to the line that contains the message and pressing the Help or F1 key. To reply to the message, key in the appropriate option code and press Enter. For example, you could tell the system to ignore the error condition that caused this message by keying in an ‘I’ and pressing Enter.

Displaying Messages Automatically

If you are signed on and want to have the system display the printer messages automatically, put the printer's message queue in break mode. For example, if you want to keep an eye on printer SYSPRT02, whose messages go to message queue PRINTERS, enter:

      CHGMSGQ MSGQ(PRINTERS) DLVRY(*BREAK) PGM(*DSPMSG) 

All messages that arrive to message queue PRINTERS will cause an interruption in your interactive job, and the message will be displayed automatically. This interruption will happen no matter what the message says or is about. For example, if someone sends a message to message queue PRINTERS using the SNDMSG command, that message will also break.

If another printer uses the same message queue, and that printer runs out of paper, you will get that message as well. You can see now why it might be to your advantage to set up a different message queue for each printer.



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net