Admin Alert: Two Tricks for Better Printer Control
March 15, 2006 Joe Hertvik
There are so many valuable printing options in i5/OS and OS/400 that it’s easy to miss some techniques for improving spooled file processing. I discovered that this week when I found two tricks that allowed me to automatically suppress printer load form messages and to segregate printer output so that I can print different sets of reports that should not be mixed on the same printer. Here are the techniques I found and how they can help in your shop. Trick #1: An Easier Way to Suppress Printer Load Form Messages In an earlier column, I presented a technique for automatically answering i5/OS and OS/400 printer load form message CPA3394: Load form type &4 device &5 writer &1 (with &4, &5, and &1 representing parameters that are presented in the message). CPA3394 can appear when a writer is restarted or reset, or when a form type for an incoming spooled file is different from the form type that was last processed on the printer. This message prompts you to load paper that has a form type matching the new spooled file output that the system is now sending down to the printer. Since most shops have several printers where they only print one type of form, my previous article discussed how to set up a system reply list entry that the system uses to automatically answer printer messages with a reply of “G” (begin processing the current file after loading the form type). This keeps your printer going when a form type change message isn’t really necessary, and you don’t want to hold up processing until someone answers the CPA3394 message. Reader Rene O’Neal alerted me to another way to handle this problem. Rene wrote that, instead of setting up your system to automatically answer CPA3394 messages, you can avoid the problem altogether by telling your i5/OS writers not to generate a CPA3394 message in the first place. Here’s how it works. Active i5/OS writers contain a pair of values that compose a writer’s Form Type parameter: a Form Type value and a Message Option value. The Form Type value tells the writer what specific spooled file form types the printer will support; the default value is *ALL (process all form types) but you can restrict form processing to only print spooled files with one specific form type. In contrast, the Message Option value tells the system what to do when an incoming spooled file is about to be printed that has a different form type than the form type of the spooled file that the printer just finished processing. For printer devices, the default Message Option value is *INQMSG, which, as I mentioned before, tells i5/OS to generate a CPA3394 message when a spooled file form type change occurs in the printer’s output queue. But, for active writers, this value can be changed to *NOMSG, which tells i5/OS to skip sending out any informational or inquiry messages when a form type change occurs. The key to this technique is that this value is not specified in either the printer device description (in the case of printer writers) or in a remote printer’s output queue parameters. It can only be set when a writer is starting or when an active writer is changed. To set a printer device’s Message Option to *NOMSG when a printer writer is starting, you can start the writer with the following Start Printer Writer command (STRPRTWTR): STRPRTWTR DEV(writer_name) FORMTYPE(*ALL *NOMSG) If you want to change the default Message Option value to *NOMSG for the STRPRTWTR command, so that it always sets Message Option to *NOMSG for all printer writers when they start, you can run the following Change Command Default command (CHGCMDDFT), like this: CHGCMDDFT CMD(STRPRTWTR) NEWDFT(‘FORMTYPE(*ALL *NOMSG)’) After you run this command, all printer devices started through STRPRTWTR will skip generating CPA3394 messages. If you only want certain printers to skip form type change message generation, you can make a copy of the STRPRTWTR command with a different name, change the default FORMTYPE values for that command, and then use the new command to start any printer where you want suppression to occur. To set the Message Option value to *NOMSG for remote writers when they are starting, enter the Start Remote Writer command (STRRMTWTR) like this: STRRMTWTR OUTQ(remote_outq_library/remote_outq_name) FORMTYPE(*ALL *NOMSG) However, it’s not usually necessary to run STRRMTWTR this way, as *NOMSG is the default Message Option value for remote writers. If you want to change this value for an active printer writer or remote output queue, you can run the following Change Writer command (CHGWTR): CHGWTR WTR(writer_name) FORMTYPE(*SAME *NOMSG) In researching this tip, I did not find any way to permanently change this parameter for printer writers or remote writers. This parameter needs to be set when the writer starts or for an active writer. However, if any reader has a solution for permanently changing this parameter in a printer device description or in a remote output queue description, I will be glad to share that solution in a future column. Trick #2: Changing Output Queues for Active Writers Another fun printer trick I learned this week is how to change output queues for active printers. Contrary to popular belief, a printer writer is not limited to processing spooled files from just one output queue. Similar to changing a printer’s Form Type values in mid-stream, you can also change a printer’s output queue as the printer is starting or when the printer is active. Here’s how this trick works. By default, every printer device is created with a default output queue that usually has the same name as the printer it is associated with. When the printer is started through the STRPRTWTR command, it automatically runs with the following parameters: STRPRTWTR DEV(writer_name) OUTQ(*DEV) The Output Queue parameter value (OUTQ) of *DEV tells the operating system to start the printer so that it processes spooled files from its default output queue. However, if you run STRPRTWTR with the following parameters, it will automatically start the writer using a different output queue. STRPRTWTR DEV(writer_name) OUTQ(outq_library/outq_name) For printers that are already running, you can change the printer’s active output queue by running the following CHGWTR command. CHGWTR WTR(writer_name) OUTQ(outq_library/outq_name) OPTION(*NORDYF) The values in the Output Queue parameter (OUTQ) designate the new name of the output queue that the printer should service. The When to Change Writer parameter (OPTION) default value of *NORDYF tells the system that it should change the writer’s output queue only after it has finished printing all the spooled files in the current output queue that match the writer’s current Form Type value. If you don’t want to wait until the writer finishes processing all its available spooled files, you can tell i5/OS to swap out your output queue after it finishes printing the current spooled file by running the following CHGWTR command. CHGWTR WTR(writer_name) OUTQ(outq_library/outq_name) OPTION(*FILEEND) You should also note that you can only use the CHGWTR command to change output queues for printer writer devices; by definition, the OUTQ parameter cannot be used to change output queues on remote writers, since a remote writer’s working configuration is contained in and based on a single remote output queue. There are some practical implementations for changing output queues on an active writer. If you want to segment spooled file output so that all the files for a particular group print at the same time, you can write each group’s spooled files out to a different output queue during the day. At night, you can then print the spooled files in each output queue in sequence to the same printer, pausing only to change output queues after each group’s files are finished. By using this technique, you can rest easy in printing two different sets of reports that should not be mixed on the same printer. RELATED STORY |