Input spooling

Input spooling takes the information from the input device, prepares the job for scheduling, and places an entry in a job queue. Using input spooling, you can typically shorten job run time, increase the number of jobs that can be run sequentially, and improve device throughput.

The main elements of input spooling follow:

  • Job queue: An ordered list of batch jobs submitted to the system for running and from which batch jobs are selected to run.
  • Reader: A function that takes jobs from an input device or database file and places them on a job queue.

When a batch job is read from an input source by a reader, the commands in the input stream are stored in the system as requests for the job, the inline data is spooled as inline data files, and an entry for the job is placed on a job queue. The job information remains stored in the system where it was placed by the reader until the job entry is selected from the job queue for processing by a subsystem.

Figure 1. Relationship of input spooling elements
Relationship of input spooling elements

You can use the reader functions to read an input stream from diskette or database files.

Figure 2. Typical organization of an input stream
Typical organization of an input stream
The job queue on which the job is placed is specified on the JOBQ parameter of the Batch Job BCHJOB or the Start Database Reader STRDBRDR command, or in the job description. The values of the JOBQ parameter for the BCHJOB command follow:
  • *RDR: The job queue is selected from the JOBQ parameter on the STRDBRDR command.
  • *JOBD: The job queue is selected from the JOBQ parameter in the job description.
  • A specific job queue: The specified queue is used.

For jobs with small input streams, you might improve system performance by not using input spooling. The Submit Job (SBMJOB) command reads the input stream and places the job on the job queue in the appropriate subsystem, bypassing the spooling subsystem and reader operations.

If your job requires a large input stream to be read, you should use input spooling (Start Diskette Reader STRDKTRDR or STRDBRDR command) so that the job can be imported independent of when the job is actually processed.