Admin Alert: How to Auto-Answer Printer Load Form Messages
by Joe Hertvik
One of the more common OS/400 job inquiry reply messages is CPA3394: Load form type '&4' device &5 writer &1 (with &4, &5, and &1 referring to parameters that are passed in with the message). This message is generated after a writer is restarted because of an IPL, a printer error, or any other time a printer is reset. CPA3394's job is to prompt you to load paper that has a form type matching the spool file output that OS/400 is sending to that printer.
For a lot of OS/400 printers--including barcode printers, green-bar printers, and even regular laser printers that are dedicated to printing one type of form, such as packing lists--replying to CPA3394 can be a waste of time, because the proper paper is usually always loaded when the writer comes up (unless the printer is out of paper, which produces another inquiry message, CPI4020). You don't load multiple form types on these printers, because they are only used to print one specific type of form. CPA3394 can even cause a delay in processing, because required forms may not print until an operator answers the message.
Fortunately, there's a way to automatically answer CPA3394 messages without human intervention. This technique uses an OS/400 construct called the system reply list, which can automatically enter responses for specifically defined inquiry messages. For printer writers started with the Start Printer Writer (STRPRTWTR) command on my OS/400 V5R1 machine, I've found that I can set up system reply list entries to automatically answer CPA3394 messages and immediately start printing, using whatever stock is loaded when the printer is restarted. Here's how I do it on my V5R1 machine (this technique may need some slight modifications when running on other OS/400 versions):
This technique works best for printer writers that are defined through OS/400 devices and started through the STRPRTWTR command. It hasn't been tested for remote writer output queues started through the Start Remote Writer (STRRMTWTR) command. By default, OS/400 device writers set their Printer Error Message (PRTERRMSG) parameter to *INQ (inquiry), which forces OS/400 to wait for an answer to any inquiry message before starting or continuing to print to the writer. An alternative way to automatically answer any printer messages might be to set PRTERRMSG to *INFO (informational), which would change the inquiry message for that printer to an informational message whenever a recoverable error such as CPA3394 occurs. However, I prefer to leave PRTERRMSG at its default setting of *INQ because, with *INFO, informational messages would be sent out for all printer inquiry messages (not just CPA3394), which might not be desirable in all situations. So when you're testing this technique, be sure that PRTERRMSG is set to *INQ for your test writer.
Write down the name of the printer for which you want to automatically answer the message. For this example, let's call it PRINTER1.
Work with the System Reply List entries for your system by entering the Work with System Reply List Entries (WRKRPYLE) command from a command line.
WRKRPYLE displays a screen showing all the automatic system reply entries that are already entered on your system. Each entry is listed with a sequence number, a message ID number, a default reply (like C, D, G, I), a compare value, and a compare start value. To add a new entry so that CPA3394 messages are automatically answered for your printer, press F6=Add. This will bring up the Add Reply List Entry (ADDRPYLE) command screen.
On the ADDRPYLE screen, enter the following fields:
Sequence Number--This must be a unique number within all of the system reply list entries. When a job is set up to use the system reply list, OS/400 searches for a system reply entry match, starting with the lowest system reply entry sequence number and ending with the highest sequence number entry or the first entry that matches the incoming message. Therefore, this number must be unique in the list.
Message Identifier--Enter the load form type message ID CPA3394 in this field.
Comparison Data--Enter the name of the printer for which you're entering a reply entry (PRINTER1, in our case). This is the name of the printer parameter that is passed in along with the CPA3394 inquiry message.
Message Data Start Position--You can leave this parameter at its initial value, *NONE. The OS/400 help text for this field states that if no value is entered, it will use a default value that tells OS/400 to look for the comparison data starting in position 1 of the incoming data.
Message Reply--This is the value you want to automatically respond to the inquiry message with. For our load form type message, we want to tell OS/400 that the printer is loaded with the proper forms and that it should start printing immediately, so enter G in this field. Answering a CPA3394 message with G tells OS/400 that it's okay to start processing the file that produced the inquiry message because you've just loaded the proper forms.
Press Enter and the new system reply list entry will be added.
After you have added the new reply entry, any CPA3394 messages for PRINTER1 will automatically be answered with a G, so you no longer have to tell the printer that the right paper is loaded.
This is my basic technique for automatically answering CPA3394 messages for a specific printer. There may be shortcuts that make this technique work for all printers on your system, so I'll leave that exercise up to any Admin Alert reader who has ideas for expanding this technique.
Now that you know how to add automatic printer system reply entries, you can easily add other reply list entries to handle any other printer messages that may occur. You can also add reply list entries to automatically answer inquiry messages for batch and interactive jobs, but the mechanics are slightly different, so I'll cover that technique in a future column.
There's got to be a better way!
Multiple systems in multiple locations -- managing them can give you a migraine. Take control with Bytware's award-winning MessengerConsole. Centralize management of all your iSeries systems whether they're in the same room or spread across the globe.
Get the Message. Get MessengerConsole.
Winner of 2003 Editors' Choice APEX Award
Timothy Prickett Morgan
Advertising Sales Representative
Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors: