next up previous 199
Next: Compiling and Linking on VMS
Up: Use of MAG on VMS
Previous: Device Dataset Names


Device Allocation and Mounting

This section deals with how to allocate and mount tape devices. It is only relevant to VMS as these concepts do not apply on Unix.

The multi-process nature of normal ADAM working and the rules associated with device allocation and mounting in VMS can result in confusion.

A simple strategy is to ALLOCATE the tape deck and MOUNT/FOREIGN the tape using DCL in the top-level process before entering any user-interface such as ICL (ICL also provides MOUNT and DISMOUNT commands in the top-level process). The advantage of using DCL's ALLOCATE command is that generic device names may be specified.

Unfortunately, if MAG_MOUNT is not used to mount the tape, the position information in the MAG common block following the MAG_ASSOC call may be incorrect. If absolute tape positions are not required, this presents no problems; however, if absolute tape positions are to be used, special action must be taken to ensure that the MAG package knows the correct position of the tape. MAG_REW as the first operation after MAG_ASSOC in the task will ensure that the position is correct, but the preferred method is to mount the tape by running the TAPEMOUNT task (which calls MAG_MOUNT) from DCL in the top-level process. For example:

      $ ADAMSTART
      $ ALL MKB
      %DCL-I-ALLOC, _RLSVS2$MKB300: allocated
      $ TAPEMOUNT MUC0 READ
      %MOUNT-I-MOUNTED,  mounted on _RLSVS2$MKB300:
      $ ICL

The parameters of TAPEMOUNT are:

DRIVE
The name of the tape to be mounted.
ACMODE
The required access mode ('READ' or 'WRITE')

When the user has finished with the tape, it may be dismounted using the TAPEDISM task (which calls MAG_DISM).

E.g.

      $ TAPEDISM MKB3000 NOUNLOAD

The parameters of TAPEDISM are:

DRIVE
The name of the tape to be dismounted.
UNLOAD
Is the tape to be unloaded (TRUE or FALSE)? This parameter defaults to TRUE if it is not specified.

If it is required that the tape is to be mounted in a subprocess, it cannot be allocated in a different process (even the parent). It is however available for use by other subprocesses or the parent process even if the mounting process is killed.


next up previous 199
Next: Compiling and Linking on VMS
Up: Use of MAG on VMS
Previous: Device Dataset Names

MAG [1ex
Starlink User Note 171
P.M. Allan
A.J. Chipperfield
12 November 1996
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council