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.

Almost all application programs that generate printed output make use of the spooling support provided by the IBM® i operating system. The values SPOOL(*YES) and SPOOL(*NO) on the SPOOL parameter of a printer file determine whether spooling support is requested.

Using the Print key to capture an image of a display screen almost always results in a spooled file being created (SPOOL = *YES must be specified in the printer file named in the workstation device description). Unless the value has been changed, the default value for the SPOOL attribute in the QSYSPRT printer file is *YES. When the Print key is pressed, the system looks at the OUTQ parameter in the QSYSPRT printer file to determine which output queue to send the spooled file to.

Spooling (SPOOL = *YES) has several advantages over direct output (SPOOL = *NO in the printer file):

  • The user's display station remains available for work.
  • Other users can request printing work without having to wait for the printer to become available.
  • If special forms are required, you can have the spooled files sent to a special output queue and printed at a time when the printer is not busy.
  • Because disk operations are much faster than printers, the system is used efficiently.