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:
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:
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.
MAG [1ex