Spooled files and output queues
The spooling function places spooled files (also known as printer output) in an output queue. This allows you to manage your printing operations more effectively.
- Spooling overview
Spooling functions are performed by the system without requiring any special operations by the program that creates the output. When a program opens a printer file, the operating system determines if the output is to be spooled by looking at the printer file SPOOL parameter. - Spooled file
Spooling is a system function that saves data in a database file for later processing or printing. This data, which is saved and eventually printed, is called a spooled file (or printer output file). When spooling is used, spooled files are created from the application program, from a system program, or by pressing the Print key. These files are put in places called output queues. - 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. - Multiple output queues
You might want to create multiple output queues for these reasons. - Output queue recovery
If a job that has produced spooled files is running when the job or system stops abnormally, the files remain on the output queue. Some number of records written by active programs might still be in main storage when the job ends and will be lost. You should check these spooled files to ensure that they are complete before you decide to continue using the files. - Spooled file cleanup
System spooled file recovery starts immediately following an initial program load (IPL). Spooled file recovery is done under the system job QSPRC00001. Spooled files on destroyed user-created output queues are moved to output queue QSPRCLOUTQ in library QRCL. Spooled files on destroyed system-created output queues are moved to the re-created output queues. - Default output queues
When a printer is configured to the system, the system automatically creates the printer's default output queue in library QUSRSYS. The output queue is given a text description of 'Default output queue for printer xxxxxxxxxx', where xxxxxxxxxx is the name assigned to the printer during configuration. The printer name is specified in the device description (DEVD) parameter. - Order of spooled files on an output queue
The order of spooled files on an output queue is mainly determined by the status of the spooled file. - Data queue support
There are two different types of data queue support for spooled files. - Spooled file names
When spooled files are created, the spooled file name is typically the same as the name of the printer file that was used to create it. For example, if the Print key is pressed, the spooled file is called QSYSPRT, because QSYSPRT is the printer file used by the Print key operation. - Spooled file security
Spooled security is primarily controlled through the output queue that contains the spooled files. - Output queue security
Output queues are created with a level of security determined by the value of the AUT parameter on the Create Output Queue (CRTOUTQ) command. - QPRTJOB job
A QPRTJOB job is a job that spooled files are associated with when the current job's user name is not the same as the user profile currently running. - Spooled file subsystem
The spooled file subsystem, QSPL, is used for processing the printer writer programs and must be active when printer writer programs are active. The spooled file subsystem and the individual printer writer programs can be controlled from jobs that run in other subsystems. - Spooled file library
The spooled file library (QSPL or QSPLxxxx, where xxxx is the number of the basic user ASP or primary independent ASP) contains database files that are used to store data for inline data files and spooled files. Each file in library QSPL or QSPLxxxx can have several members. Each member contains all the data for an inline data file or spooled file. - Spooled files in independent ASPs
Spooled files can be stored in output queues that are located in independent disk pools (also known as independent auxiliary storage pools or independent ASPs).
Parent topic: Printing concepts