Batch Job

From VSI OpenVMS Wiki
Jump to: navigation, search

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

  1. 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.
  2. JOB_CONTROL sends the request to the QUEUE_MANAGER process on the appropriate node in the cluster.
  3. 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.
  4. The QUEUE_MANAGER process gets information about the job from the queue database.
  5. It then sends that to the JOB_CONTROL process on the target node.
  6. 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.
  7. The batch process reads the command procedure using SYS$COMMAND and executes it.
  8. When the batch job completes, a status message is sent to the JOB_CONTROL process.
  9. 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.
  10. The queue manager then sends the status of the batch request back to the originating job controller process.
  11. The originating job control process then sends the status of the request back to the process that made the original request.
  12. The system attempts to print the job log; if unsuccessful, it keeps the log, otherwise the log is deleted.

Properties

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).

See also