The tape-read Program
Overview

The tape-read program is, as you might imagine, used to read tapes -- either actual magnetic tapes, or images of tapes that have been serialized in the JBI-developed ".tap" file format.

tape-read Operation

The operation of the program varies somewhat from platform to platform. A synopsis of the options and command line arguments can be obtained for all versions of the tape-read program by supplying the "-h" option, to request the help summary be printed.

On non-VMS Platforms

On all platforms other than VMS, the tape-read program is expected to most commonly be used to read from one or more JBI format .tap files, and to produce a series of files which have the record length information supplied by the .tap file format deleted.

The tape-read program can be built either by simply compiling all the .c files in the tape-read directory, or by running the "make" program to read and execute the build instructions in the Makefile:


    $ make
    gcc -Wall -Wextra -g -c tape-read.c
    gcc -Wall -Wextra -g -c error.c
    gcc -Wall -Wextra -g -c crc.c
    gcc -g -o tape-read tape-read.o error.o crc.o
    

The only argument that has to be supplied to the non-VMS version of the tape-read program is a list of one or more .tap files to be processed:


    $ ./tape-read jbi/5500*
    Tape 'jbi/5500063.tap', report file 'file-00000.rpt', prefix 'file-'
	Read 63 files, 52197120 bytes with 0 errors

    Tape 'jbi/5500157.tap', report file 'file-00000.rpt', prefix 'file-'
	Read 30 files, 95048640 bytes with 0 errors

    Tape 'jbi/5500230.tap', report file 'file-00000.rpt', prefix 'file-'
	Read 39 files, 15140160 bytes with 0 errors

    Total tapes: 3; total files: 132; total_bytes: 162385920
    

On VMS Platforms

On VMS, the tape-read program will be used primarily to read files from a single magnetic tape, store the data in a series of sequentially numbered variable record length VMS files, and produce a report of the files read listing the minimum and maximum record length encountered and a CRC value for the data in each file.

The tape-read program is built using the VMS "mms" program, which reads and executes build instructions contained in the descrip.mms file.


    $ mms
    cc/include_dir=[] tape-read
    cc/include_dir=[] error
    cc/include_dir=[] crc
    link tape-read.obj,error.obj,crc.obj
    

The resulting executable, tape-read.exe, has to be run as a VMS foreign command, for example by binding it to the "taperead" alias:


    $ taperead :== $std_user:[kodis.tape-read]tape-read.exe
    

Before a tape can be read, it must be mounted as a foreign volume with a large block size, as for example:


    $ mount /foreign /blocksize=65534 mkb500:
    %MOUNT-I-WRITELOCK, volume is write locked
    %MOUNT-I-MOUNTED,  mounted on _ICEAGE$MKB500:
    

On VMS, the tape-read program requires either two or three arguments in addition to any options. The first argument is a label to be used in forming the filenames, and the second argument is the tape drive to be read. This will generate a report of the files on the tape without storing the files. To save the files, an output directorymust be created and its name supplied as the third argument, as for example:


    $ create /directory [.dr03307]
    $ taperead dr03307 mkb500: [.dr03307]
    Tape drive mkb500:, tape dr03307, report file dr03307.RPT, output [.dr03307]
	Read 89 files, 109464480 bytes with 2 errors
    

After being read, the tape will have to be rewound if it is to be reread. The VMS "set" command is used for this:


    $ set mag/rewind mkb500:
    

When done with a tape, it should be unloaded and the drive dismounted to make it available for another user:


    $ dismount /unload mkb500:
    

While the VMS version of the tape-read program will most commonly be used to read from magnetic tape, it can be used to read files from a JBI .tap format file by supplying the "-t" option, and supplying the path to a .tap file in place of the tape drive specification.

Development Timeline

A development timeline is available which details these development steps and the CMMi paperwork associated with all current releases of the tape-read program.


John Kodis, john.kodis@nasa.gov, 2012