A batch job is a command procedure that has been submitted for processing to a batch queue. Once submitted, it is assigned an entry number which can be used to affect the execution of the job.
Batch Request Processing
- A submit request is made interactively or from an application. It is handled by the SYS$SNDJBC system service that sends all the information about the request to the JOB_CONTROL process.
- JOB_CONTROL sends the request to the QUEUE_MANAGER process on the appropriate node in the cluster.
- The QUEUE_MANAGER process stores the information regarding the job in the queue database. If the job should be started right away, it goes on to the next step. If it should not, it sends the job status to the process that made the original request.
- The QUEUE_MANAGER process gets information about the job from the queue database.
- It then sends that to the JOB_CONTROL process on the target node.
- The JOB_CONTROL process on the target node invokes the LOGINOUT.EXE program to check the UAF file and create a batch process. The process uses SYS$COMMAND to get inputs and sends outputs to a log file. LOGIN.COM and SYLOGIN.COM are executed.
- The batch process reads the command procedure using SYS$COMMAND and executes it.
- When the batch job completes, a status message is sent to the JOB_CONTROL process.
- JOB_CONTROL sends an acknowledgement of the request back to the queue manager process. The JOB_CONTROL and the QUEUE_MANAGER process continue to communicate whenever the status of the print job changes. The queue manager updates the queue database with the status of the job.
- The queue manager then sends the status of the batch request back to the originating job controller process.
- The originating job control process then sends the status of the request back to the process that made the original request.
- The system attempts to print the job log; if unsuccessful, it keeps the log, otherwise the log is deleted.
Batch job properties are specified with the following qualifiers to SUBMIT and SET ENTRY:
- execution time: jobs can be submitted to run at a specified time using the /AFTER qualifier
- CPU time limit: specified as delta time, 0/INFINITE, or none with /CPUTIME (see CPU Time Limit for Processes)
- whether the job is held in the queue until explicitly released: specified with the /HOLD qualifier
- the specification of the log file (set with the /LOG qualifier; by default, the log file is named <command procedure name>.log and placed in the submitting user's default directory)
- job-scheduling priority of the job (set with the /PRIORITY qualifier; OPER or ALTPRI is required to raise the priority above the value of the queue's maximum scheduling priority. The default is specified with the DEFQUEPRI system parameter.
- the working set extent, the maximum amount of physical memory that the job can use (set with /WSEXTENT)
- the working set default, the default number of physical pages that the job can use (set with /WSDEFAULT)
- the working set quota, the amount of physical memory that the job is guaranteed (set with /WSQUOTA)
- whether the job log is printed after the job completes (the default behavior is print and delete the log after it has been printed; to avoid printing, specify /NOPRINTER; to avoid deleting the log, specify /KEEP).