Output spooling

Output spooling can be used for both printer and diskette devices. Output spooling sends job output to disk storage instead of sending it directly to a printer or diskette output device. Output spooling allows the job that produces the output to continue processing without consideration for the speed or availability of output devices.

Additionally, output spooling allows the server to produce output on multiple output devices, such as printer and diskette devices, in an efficient manner. It does this by sending the output of a job destined for a printer to disk storage. This process breaks a potential job limitation imposed by the availability or speed of the output devices.

The main elements of output spooling are:

Output spooling functions are performed by the server without requiring any special operations by the program that produces the output. When a device file is opened by a program, the operating system determines whether the output is to be spooled. When a printer file specifying spooling is opened, the spooled file containing the output of the program is placed on the appropriate output queue in the server.

A spooled file can be made available for printing when the printer file is opened, when the printer file is closed, or at the end of the job. A printer writer is started in the spooling subsystem to send the records to the printer. The spooled file is selected from an output queue.

Spooling device descriptions

Device descriptions must be created for each printer and diskette device in order to define that device to the server. Printer device descriptions are created using the Create Device Description for Printer (CRTDEVPRT) command; diskette device descriptions are created using the Create Device Description for Diskette (CRTDEVDKT) command.

File redirection of spooled files

File redirection occurs when a spooled file is sent to an output device other than the one for which it was originally intended. File redirection can involve devices that process different media (such as printer output sent to a diskette device) or devices that process the same type of media but are of different devices types (such as 5219 Printer output sent to a 4224 Printer).

Depending on the new output device for the spooled file, the file can be processed just as it would have been on the originally specified device. However, differences in devices often cause the output to be formatted differently. In these cases, the server sends an inquiry message to the writer's message queue to inform you of the situation and allow you to specify whether you want printing to continue.