Batch Queues


Batch queues act like UNIX background. OpenVMS has no background mode, so instead a user-created job (actually a command file script) is executed at lower-than-interactive priority. [2] Batch jobs are created with the SUBMIT command. This batch mode concept is more in line with the IBM mainframe concept of a batch job. A job submitted to a batch queue may be run on any node in the cluster and may be delayed before execution is begun. The batch job typically takes on the same environment as the submitting user (e.g., privileges and disk environment are the same); however, the user has control of some of these characteristics. Only SYSTEM may create batch jobs on behalf of other users.

Batch queues can be configured to run one job at a time or multiple jobs in parallel. Furthermore, a user may submit multiple jobs to any queue. The manager can create multiple batch queues, and they can be configured to run jobs on a specific node in the cluster or on any available node (i.e., the queue manager can do load leveling). Creation of a batch queue is performed with a single command, such as the following:

       $ INITIALIZE/QUEUE/BATCH -       _$ /AUTOSTART_ON=(NODE1::, NODE2::)  SYS$BATCH 

The INITIALIZE command only has to be performed once. This information is stored in the queue manager database. This saves time when the node is rebooted. After each boot (typically in SYS$MANAGER:SYSTARTUP_VMS.COM), the preinitialized autostart queues must be started with

      $ ENABLE AUTOSTART/QUEUES 

The advantage of autostart queues in a cluster environment is to provide automatic fail-over if one of the nodes becomes unavailable. In a single node environment (not a cluster), the commands would become:

      $ INITIALIZE/QUEUE/BATCH SYS$BATCH      $ START/QUEUE SYS$BATCH 

The initialize and autostart conventions apply to printer queues (described in the following sections) as well.

[2]Alternately, the SPAWN command can be used to create a child process for execution of a script or command. This topic was discussed briefly in Chapter 1.




Getting Started with OpenVMS System Management
Getting Started with OpenVMS System Management (HP Technologies)
ISBN: 1555582818
EAN: 2147483647
Year: 2004
Pages: 130
Authors: David Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net