To wrap up this series of posts on tapes I will show a quick way to mount them that does not require switching to the operator's console and responding to the mount request.
Say you wanted to mount the D6.0T1 distribution tape which is on T904. Normally you would issue the
$mount command from a user terminal:
$mount mts:tape1 9tp *t* vol=6.0T1 lbltype=vlo
and then switch over to the operator's console to say
OK TAPE1 T904
Instead you can do this from your MTS session:
$get >t904 $control *afd* volume=6.0T1 $control *afd* lbltype=vlo
You can then run any program that uses the tape by pointing it to pseudodevice
*afd*, for example:
$run *fs 0=*afd*
When finished you need to
$release *afd* as usual. Once you release it, the tape will not go offline like for normal mounts so you don't need to
devinit it on the Hercules console before using it again.
So although this is much quicker to use than regular
$mount, there are a number of drawbacks:
- You have to be a privileged user to
$geta tape device - so with the starter set of users you can sign on as
MTSand do this but account
ST01would not work
- You can only have one FDname open at a time whereas you can
$mountmultiple tapes and give them different pseudodevice names. If you try to
$geta second tape it will release the first one and reassign
*afd*to the new tape.
- You need to remember to issue the
$controlcommands to identify the tape, otherwise you will get errors trying to run programs against
$get is a MTS command but is not mentioned in MTS Volume 1 - you will need to get the System Edition which lists privileged and obsolete commands.
*afd* stands for Active File or Device and is described in the last chapter of the manual. It provides a lower level way of accessing FDnames than regular MTS commands like
*afd* is activated, lines typed at the terminal which do not start with a
$ are interpreted as data lines which are written to
*afd*. Assuming the defaults of line files and auto numbering off, if you type a line at the command prompt starting with a number it will be added to
*afd* using that line number rather than being interpreted as a MTS command.
An example using a regular file will make this clearer:
$get -gettest # Ready. 10welcome 20MTS 15to release # "*AFD*": ... AFD released. $list -gettest 10 welcome 15 to 20 MTS