z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Comparison of shell background jobs and MVS batch jobs

z/OS UNIX System Services User's Guide
SA23-2279-00

Table 1 compares two methods for submitting a background job:
  • Typing an & (ampersand) after the shell command
  • Using JCL with BPXBATCH. This utility is discussed in The BPXBATCH utility.
Table 1. Comparison of running a background job from the shell and from MVS
Topic Shell (command &) JCL with BPXBATCH
Starting the job Background jobs start running immediately. Background jobs are put in a queue; there may be a wait until the job starts running.
Interactive access You can see output from the job displayed on the terminal. You can move the job to the foreground if you need to give it input, and then move it to the background again. Background jobs run separately; you cannot interact with them.

However, if you redirect output to a file in the file system, from your interactive shell session you could periodically browse the output file to see what is in it. You could do this with any of these commands: cat, pg, more, obrowse, or the TSO/E OBROWSE command.

System limits Due to system limits on the number of processes per user, multiple background jobs run by the same user could fail at some point. Due to system limits on the number of processes per user, multiple background jobs run by the same user could fail at some point.
Managing the job You can use ps, kill, bg, fg and jobs on the background job. You can use ps and kill on the background job.
Impact on system Creates an immediate demand on the system to support another address space. This could degrade performance for all users. The system determines when it is a reasonable time to run batch jobs. Batch work can be suspended during periods of heavy interactive workload.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014