Contents
The CA VM:Batch/CA VM:Tape interface enhances and controls the use of tape drives and tape volumes by CA VM:Batch jobs. It provides two major functions, each of which has several benefits:
- All CA VM:Tape commands issued by the worker during the CA VM:Batch job are treated by CA VM:Tape as if they were issued by the user ID that owns the batch job. This part of the interface has these effects:
- The CA VM:Batch job can use all CA VM:Tape volumes that the owner of the batch job has access to, and any new tape created during the job will be owned by the user ID that owns the batch job (rather than the worker machine user ID).
- CA VM:Batch requests CA VM:Tape to set up an alternate user ID relationship. All CA VM:Tape authorizations that the batch job owner may have are also granted to the batch worker machine while the job is executing. These authorizations are specified on AUTHORIZ records in the VMTAPE CONFIG file.
- If you are using the CA VM:Secure Rules Facility, all CA VM:Secure rules controlling CA VM:Tape commands for the batch job owner are also in effect for the batch worker machine during job execution. This will cause CA VM:Tape CATALOG, LIST, and MOUNT commands issued from a batch job to succeed or fail based on CA VM:Secure rules processing, just as if the command were issued by the job owner.
- Before starting each job, CA VM:Batch interfaces with CA VM:Tape to reserve the requested number and type of tape drives required by the job, ensuring that they will be available when the job executes. This part of the interface has these effects:
- CA VM:Batch requests CA VM:Tape to reserve tape drives. When a CA VM:Batch job starts, all tape drives requested by the job will be immediately available, reducing unsuccessful job runs or prolonged run times due to tape drive availability.
- Batch jobs that require CA VM:Tape services will not be started if CA VM:Tape is not available, increasing the reliability of your CA VM:Batch jobs. Such jobs will remain in the job queue and will be initiated when CA VM:Tape becomes available.
- The reserve drive function, with the CA VM:Tape AUTHORIZ RESONLY configuration file record, can control and limit the number of tape drives available to CA VM:Batch jobs. This allows the system administrator to control the use of valuable resources by placing limits on the number and type of drives available to each batch job class, to each user ID, to groups of CA VM:Batch users, and to the entire CA VM:Batch system.
- All mounts will select only reserved drives for users with RESONLY authorization. When no reserved drives are available the request will hold in a pending state if QUEUE (the default) is indicated and will be cancelled if NOQUEUE is indicated.
How the Interface Works
The following example illustrates what happens when a user submits a job to CA VM:Batch that requires two CA VM:Tape volumes to be mounted.
- User ETHEL submits a CA VM:Batch job, specifying that two tape drives of 38K density will be required:
VMBATCH SUBMIT COPYTAPE EXEC A (NAME COPYTAPE VMTAPE (DEN 38K)
- When ETHEL's job reaches the top of the job queue, CA VM:Batch selects a worker machine to run the job and sets the worker as a CA VM:Tape alternate user ID for ETHEL, which would allow it to access ETHEL's tapes. Then CA VM:Batch tries to reserve two 38k tape drives for that worker. If CA VM:Tape indicates that the needed drives are not free, CA VM:Batch will not start the job and clears the alternate user set for the worker. The job will be tried again later.
- When two drives are available, the reserve attempt will be successful and the drives will be reserved for use by the worker machine (but not attached to the worker). These drives will remain reserved for the worker throughout the execution of this job, regardless of how many times they are attached and detached during the job.
The worker machine is then autologged and ETHEL's job, COPYTAPE EXEC, is started. - ETHEL's job may issue two mount requests. For example:
VMTAPE MOUNT * DSN ORIGINAL.TAPE (READ WAIT VMTAPE MOUNT SCRATCH DSN COPY.ONE (WRITE WAIT
- If ETHEL's job issues a third CA VM:Tape MOUNT command, the result depends upon whether the worker machine running the job is specified on an AUTHORIZ RESONLY record in the VMTAPE CONFIG file. If the worker is specified on the AUTHORIZ RESONLY record, the mount request will fail because the worker can only obtain drives that have been previously reserved for it by CA VM:Batch. If three tape drives were needed, the job request should have specified VMTAPE (DEN 38k), or the EXEC should rewind and unload one of the tape volumes and detach the drive before issuing the third mount request.
If the worker is not defined as RESONLY, the mount request will be processed normally by CA VM:Tape, causing the job to halt execution until the drive allocation and tape mount are completed. - After ETHEL's job has finished running, the worker notifies CA VM:Batch that the job is ending and logs off.
- CA VM:Batch then cancels any pending mount or allocate requests which may be left over from the job, clears the CA VM:Tape alternate user ID relationship between the worker machine and ETHEL, and then releases the two 38k drives so that CA VM:Tape can assign them to the next request.
Restrictions and Requirements
Usually, the WAIT option should be specified on the CA VM:Tape MOUNT and ALLOCATE commands. If NOWAIT is specified (or is the default), the job will continue executing as soon as the CA VM:Tape command is completed and before the actual tape mount is completed.
If the worker machine user IDs are specified on AUTHORIZ RESONLY records in the CA VM:Tape configuration file, then they can only use the drives reserved for them. CA VM:Batch jobs that issue CA VM:Tape MOUNT or ALLOCATE commands must specify either the VMTAPE UNIT or VMTAPE DEN option or the TAPxxxx option on the CA VM:Batch SUBMIT command to indicate the number and type of tape drives required. If this is not done, the CA VM:Tape command will fail because no drives were reserved before the job started.
Implementation
- Log on to VMTAPE.
- Enter the END command to shut down VMTAPE.
- Make sure there is a PRODUCT VMBATCH VMBATCH record in the VMTAPE CONFIG file. This configuration file record provides CA VM:Tape with the CA VM:Batch service virtual machine user ID. This record activates the CA VM:Tape side of the interface.
- Make sure there is an AUTHORIZ RESONLY VMBATnnnn record in the VMTAPE CONFIG file for the CA VM:Batch worker machines. These configuration file records require the CA VM:Batch worker machines to obtain tape drives that have been previously reserved for them.
- Enter the PROFILE command to restart VMTAPE.
- Enter the #CP DISCONN command to leave VMTAPE running disconnected.
- Log on to VMANAGER.
- Enter the CA VM:Batch CONFIGUR command.
- Make sure that there is a PRODUCT VMTAPE vmtape record in the VMBATCH CONFIG file. This configuration file record provides CA VM:Batch with the CA VM:Tape service virtual machine user ID. This record activates the CA VM:Batch side of the interface.
- Enter the FILE command to save the changes.