Output queue

Output queues are objects, defined to the system, that provide a place for spooled files to wait until they are printed. Output queues are created by a user or by the system.

You can create an output queue using the Create Output Queue (CRTOUTQ) command. On the prompt display, specify the name for the output queue to create. The output queue will be in the library identified by the library prompt. You can create as many output queues as you want.

When a printer is configured to the system, either manually or through automatic configuration, the system creates an output queue for that printer in the QUSRSYS library. System-created output queues are commonly called device output queues and have the same name as the printer device. For example, when you configure a printer using the Create Device Description (Printer) (CRTDEVPRT) command, if you assign the printer name PRT01 in the DEVD parameter, the system creates an output queue named PRT01 in the QUSRSYS library.

If none of the IBM-supplied default values for the system have been changed, you can identify your output queue by displaying the system value Default printer (QPRTDEV). Your output queue has the same name as the value shown for the system printer.

Spooled files are created when application programs are run. If you do not want the spooled files to print right away, you can have them sent to an output queue that currently does not have a printer assigned to it. For example, let us assume that you have only one printer available. One of your application programs creates a job that has 600 pages of printed output. Since all users are using the same printer, you do not want to print the 600-page job until everyone has finished working for the day. One solution is to create two separate output queues. One output queue receives the spooled files from the application program that creates the 600 pages of printed output. The other output queue receives the spooled files from the jobs run by other users.

The program that creates the 600-page job sends the spooled file to a specific output queue. That output queue does not have a printer assigned to it. Therefore, the 600-page spooled file has to wait until a printer is assigned; meanwhile, the spooled files that are in the other output queue can be printed. Multiple output queues can also be used with deferred printing. To print a large spooled file that exceeds the current limit for the printer's output queue, the printer can be assigned to an output queue without any limit. Another solution is to set the maximum spooled file size to print during a specified time. For example, a maximum spooled file size of 100 pages can be set from 08:00:00 to 17:30:00 hours. During this time, only spooled files of 100 or fewer pages are printed. After 5:30 p.m. any spooled file prints. Spooled files that are too large are placed in deferred status (*DFR) until they can be printed. See Controlling printing by spooled file size for more information about how to configure deferred printing.