3.9 Magnetic tapes

Large volumes of data were once brought into, and taken away from, AIPS using magnetic tape. Disk files are now much more frequently used; see §3.10. Tape usage in AIPS is described here, in case you still have need of it, but the descriptions of tapes elsewhere in this CookBook have been greatly reduced. The tape drives assigned to you are displayed as you start up AIPS, e.g.Tape assignments: Tape 1 is IBM 9-track model 9348-012 on LEMUR Tape 2 is HP 9-track model 88780B on LEMUR Tape 3 is IBM 7208/001 Exabyte 8200 (external) on LEMUR Tape 4 is ZZYZX 1.3Gb DAT (left, Model# ZW/HT1420T-CC6) on LEMUR Tape 5 is ZZYZX 1.3Gb DAT (right; both 150mb personality) on LEMUR Tape 6 is IBM Exabyte 8200 (internal) on LEMUR Tape 7 is REMOTE Tape 8 is REMOTE

for the heavily loaded, and now obsolete, IBM called lemur. The tape numbers you see above correspond to AIPS adverb INTAPE values of 1, 2, 3, and so on. The description is meant to give you some idea of which box or slot is to receive your tape. Most of the drives will have a label on them identifying their AIPS tape number. If in doubt, ask a local guru for help. The last two tape “drives,” called REMOTE, will be discussed separately below.

In case you forget this list, the verb TAPES will show it to you. TAPES is even capable of going out on the Internet and asking what devices are available to an AIPS user at the computer specified by the REMHOST adverb (if it is running TPMON)! Note however that instances of TPMON are no longer started automatically when AIPS is started.

3.9.1 Hardware tape mount

On some AIPS systems, tapes are handled by designated operators. Before mounting tapes, read Appendix Z (for NRAO sites) or obtain directions from your local AIPS Manager or operators for methods by which tapes are to be handled. Most AIPS systems, however, are on the self-service plan. In that case, the simplest thing to do is to find a drive of the required type without a tape in it. There is no way in most Unix systems (certainly not in Linux or Mac OS/X) of reserving a tape drive globally for your exclusive use, though once you have it MOUNTed from within AIPS, no other AIPS user can access it. It is most efficient to use a tape drive directly connected to your computer (and hence listed as you started up AIPS). However, any “AIPSable” drive will do. Mount the tape physically on the drive following the mounting instructions in Appendix Z or those posted at your installation for the particular kind of tape drive. For half-inch (nine-track) tapes, don’t forget to insert a write ring if you intend to write on the tape or to remove any write ring if you intend only to read the tape. Exabyte and DAT tapes have a small slide in the edge of the tape which faces out which takes the place of the write ring of 9-track tapes. For 8mm (Exabyte) tapes push the slide to the right (color black shows) for writing and to the left (red or white shows) for reading. With 4mm DAT tapes, the slide also goes to the right for writing (but white or red shows) and to the left for reading (black shows). Note the identification number m marked on the drive you are using, as you will need to provide that number to the software for mounting and dismounting the tape and for executing AIPS tasks which read or write tape.

3.9.2 Software mounting local tapes

After you have the tape physically mounted on the tape drive, AIPS must also be told that you have done this and which tape drive you have chosen. This step is called a “software tape mount.” It is necessary to wait until the mechanism in the drive has “settled down”, i.e., when the noises and flashing lights have stopped, before you can do the software mount. This operation is done from inside AIPS by typing:

> INTAPE  m  C R

to specify the drive labeled m.

> DENSITY  dddd  C R

to set the density to dddd bpi if needed.

> MOUNT  C R

to mount the tape in software.

Read any messages which appear on your terminal carefully since they report the success, failure, and/or limitations of the operation. The meaning of “density” with modern magnetic tape devices is mostly a matter of convention. With half-inch, 9-track tapes, AIPS understands the usual 800, 1600, and 6250 bytes per inch densities. A special value for density, 22500, is taken to mean high density (5-Gbyte) mode on 8mm (Exabyte) tapes. You must set the DENSITY adverb to one of these magic values, but in many cases it does not matter which one you use.

Please dismount the tape as soon as you are finished with it, using:

> INTAPE  n ; DISMO  C R

to dismount a tape from the drive labeled n.

The dismount verb should cause the tape to be rewound and, in most cases, ejected from the drive. Please remove the tape from the tape drive promptly so that others may use the drive. Note that exiting AIPS under most circumstances — even with CTRL C — will cause your mounted tapes to be dismounted automatically.

3.9.3 Software mounting REMOTE tapes

On all AIPS systems, the last two tape drives are indicated as REMOTE. This means you can use two additional adverbs in AIPS to access tape drives on other computers. It doesn’t matter where the computer is, as long as it’s connected via Internet and has AIPS installed on it in the conventional way. For example, if you wanted to use AIPS tape drive 2 on remote host rhesus, you would type:

> REMHOST  ’RHESUS’ ; REMTAPE  2  C R

> DENSITY  dddd  C R

to set the density to dddd bpi if needed.

> INTAPE  n ; MOUNT  C R

set local “tape” number and software mount

where n is the number of one of the REMOTE tape assignments in the list of tape drives you see on AIPS startup. If you know which computers are to provide remote tape services for you, it is a good idea to specify them when you start AIPS using the tp=hostname option (see §2.2.3). In this way, you make certain that the AIPS dæmon tasks TPMONn which provide the remote service are running where they are needed. Note that this option is commented out of START_AIPS in 31DEC24.

3.9.4 Using tapes in AIPS

AIPS provides a number of basic tools for managing magnetic tapes. It is very helpful to have a list of the contents of magnetic tapes you intend to read. To list the contents of a tape on the line printer:

> TASK PRTTP’ ; INP  C R

to review the inputs.

> NFILES 0  C R

to list all files on the tape.

> PRTLEV 0  C R

to list the image headers but not the details — both more and less detailed listings are available.

> DOCRT FALSE  C R

to print on the line printer.

> GO  C R

to run the task.

It is also a good idea to run PRTTP on your data tapes after you have written them, but before you have deleted the data from disk. PRTTP reads the the tape record by record to test for tape errors as well as to check the data format.

The AIPS program has a number of verbs to position and check magnetic tapes. These include

> REWIND  C R

to rewind the tape, e.g., after running PRTTP.

> NFILES n ; AVFILE  C R

to advance the tape n > 0 file marks.

> NFILES -n ; AVFILE  C R

to move the tape backwards to the nth previous file.

> NFILES 0 ; AVFILE  C R

to position the tape at the start of the current file.

> AVEOT  C R

to advance the tape to the end of information, usually for the purpose of adding more data at the end.

> TPHEAD  C R

to display the contents of the data file at the current tape position.

Users are encouraged to treat magnetic tapes with some caution. The tapes themselves can have — or develop — errors which render the data in the file unavailable. Furthermore, there are no generally accepted standards governing magnetic tape software in the industry. As a consequence, each Unix operating system handles them differently and each can change over time. This creates great difficulties in AIPS and may cause your version not to handle all tape devices in a fully compatible manner.

AIPS tasks are still able to handle tapes, should the need arise. Output tapes may be written with FITTP, FITAB, and TCOPY. Input tapes are read by IMLOD, UVLOD, FITLD, FILLM, M3TAR, MK3IN, and MK3TX.