Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

10.0;rwmt (read_write_magtape), revision 1.0, 88/03/04
rwmt (read_write_magtape) - read/write foreign magtapes.
usage:  rwmt [option]... [-p] {-r|-w|-i|-l} [pathname]...



DESCRIPTION
     rwmt reads tapes from non-Domain installations and writes tapes that can
     be read by non-Domain installations.  rwmt can read and write unlabeled
     tapes, as well as ANSI level 1-4 labeled tapes.

     pathname (optional)
                    Specify the name of file to be read from or written to
                    tape.  This argument is valid only with the -r and -w
                    mode-control options (below). Multiple pathnames are
                    permitted.  Wildcarding is permitted for write (-w)
                    operations only.

                    Default if omitted:  read pathnames from standard input

OPTIONS
Mode control
     You must specify one of the following mode-control options.  If you omit
     this option, rwmt prompts you for it. The -p option tells rwmt to prompt
     for all necessary options.

     -l[abel]       Write ANSI X3.27-1978 volume label on a tape.  This option
                    causes rwmt to write an ANSI volume label and dummy file
                    on the magtape volume.  You may specify an optional owner
                    and volume ID, which are stored in the volume label. (see
                    -vid and -own below. This is the way to initialize a
                    labeled tape; if any information existed on the tape, it
                    is erased by this labeling operation.

                    If you are labeling a tape, you can also use the following
                    two options.


                    -vid vol_id  Specify a 1-6 character volume ID for use
                                 when labeling a volume.  This option is valid
                                 only when used with the -l mode-control
                                 option (above). The default volume ID is ' '
                                 (blank).

                    -own owner_id
                                 Specify a 1-14 character owner ID for use
                                 when labeling a volume. This option is valid
                                 only when used with the -l mode-control
                                 option (above). The default owner ID is ' '
                                 (blank).

     -i[ndex]       List objects on an ANSI-labeled physical tape volume.
                    -index produces a listing of all files or file sections on
                    an ANSI-labeled physical tape volume.  The contents of the
                    physical volume (VOL1) label and all file header labels
                    are written to standard output.

     -w[rite]       Specify one or more disk files (pathname argument) to be
                    written to tape.  The default  format is ANSI labeled,
                    ASCII, fixed-length records of 80 bytes each, and 80-byte
                    blocks.  If desired, any of these parameters can be
                    changed using the options described below. If more than
                    one pathname is specified, the disk files are written to
                    sequential tape files.  Tapes written by rwmt are always
                    in accordance with ANSI level 4 format.
                    Before writing a labeled file, the tape volume itself must
                    be labeled with the -label mode-control option (above).

     -r[ead]        Specify one or more tape files to be read from tape and
                    stored on disk. read reads one or more tape files and
                    writes them to disk using the specified pathnames
                    (pathname argument).  The default tape file format is the
                    same as that for the write option.  If the tape is labeled
                    under ANSI level 2, 3, or 4, the file format (block
                    length, record length, and record format) is read from the
                    tape.  If the tape is unlabeled, or labeled with ANSI
                    level 1, you must specify the tape format using the
                    options below.  If more than one pathname is specified,
                    adjacent tape files are read and stored under the
                    specified pathnames.

Label Control
     -ansi (default)
                    Specify that the tape is labeled in conformance to ANSI
                    X3.27-1978, level 1, 2, 3, or 4.

     -unlab         Specify that the tape is unlabeled. Data spanning physical
                    volumes is not supported on unlabeled tapes.

     -asc (default) Specify that all tape file contents are in ASCII
                    characters.

     -ebc           Specify that all tape file contents (except labels) are in
                    EBCDIC characters.

     -raw           Specify that all tape file data is to be treated in raw
                    form.

     -npar (default)
                    Specify no disturbance of parity bits when reading or
                    writing data.

     -par           Specify that parity bits should be forced off when reading
                    data from tape and forced on when writing data to tape.

     -rl reclen     Specify the maximum length, in bytes, of a record in the
                    tape file. This option is valid only when used with either
                    the -r or the -w mode-control options (above). It is
                    unnecessary when reading an ANSI level 2, 3, or 4 file.
                    The default record length is 80 bytes.

     -bl blocklen   Specify the length, in bytes, of a physical tape block.
                    This option is valid only when used with either the -r or
                    the -w mode-control options (above).  It is unnecessary
                    when reading an ANSI level 2, 3, or 4 file.  The default
                    block length is 80 bytes.

     -bf blockfac   Specify a blocking factor -- the number of records to
                    store into or read from a physical tape block.  This is an
                    alternative to the -bl option, since the record length
                    multiplied by the blocking factor yields the block length.
                    This option is valid only when used with either the -r or
                    -w mode-control options (above).  Using this option is
                    meaningful only if your tape has fixed-length records.
                    This option is unnecessary when reading an ANSI level 2,
                    3, or 4 file.  The default blocking factor is 1.

     -rf format     Specify record format.  Valid values for format are f
                    (fixed-length records and blocks); d (variable-length
                    records (this is ANSI 'D' format)); s (spanned records);
                    or u (undefined record format). The default format is f.
                    Note that if you are writing a cartridge tape, only 512
                    byte blocks may be written; d, s, and u formats are not
                    supported.

Tape File Identifiers
     -fid file_id   Specify a 1-17 character file ID to be written in the file
                    header label for use when  writing a file to a labeled
                    volume.  This option is valid only when used with the -w
                    mode-control option (above). If this option is omitted,
                    the name of the file being written is used.

     -f [position]  Specify the file position for -r or -w operations. Valid
                    values for position are cur, end, or a nonzero integer
                    value.  A position of cur selects the current tape
                    position; the tape must  have been previously read or
                    written by rwmt and its position must not have been
                    disturbed. This option is valid only when used with either
                    the -r or the -w mode-control options (above).

                    A position of end selects the end of the tape file set.
                    This option is valid only when used with the -w mode-
                    control option, and causes rwmt to append the specified
                    disk file (pathname argument) to the very end of the tape
                    file set.

                    A position specified by a nonzero integer value selects
                    the file at that absolute position in the tape volume.
                    This option is valid only when used with either the -r or
                    -w mode-control options (above). If multiple pathname
                    arguments are supplied, the value of position is
                    incremented by one after each file has been read or
                    written.

                    The default value for position is 1.

Backup Device Control
     -dev d[unit]   Specify device type and unit number.  d must be either m
                    (for reel-to-reel magnetic tape), ct (for cartridge tape),
                    or f (for floppy), depending on which drive is being used.
                    unit is an integer (0-3).  Both are required for
                    reel-to-reel tapes (that is, -dev m2). A unit number is
                    not required for floppy disks and cartridge tapes (that
                    is, -dev f).  If this option is omitted, rbak assumes
                    device m0.

     -nobs          Specifies that byte swapping should not be done in
                    software.  This operation is valid for magnetic tapes
                    only. On the multibus data gets byte swapped. rwmt does
                    byte swapping in software so that the tape gets written
                    out in the correct machine order. wbak and rbak do not do
                    byte swapping in software, as a result the two swaps done
                    by the multibus cancel out. This option is  useful in
                    writing to a magnetic tape an intermediate file to which
                    wbak output has been directed. Byte swapping should not be
                    done by rwmt if the intermediate file written by wbak is
                    now written raw to the magnetic tape using rwmt.

     -reten         Retension the cartridge tape (unwind to the end, then
                    rewind).  This can be helpful if you have encountered
                    cartridge-tape reading errors.  Retensioning requires
                    about 1.5 minutes to complete.

     -nreten (default)
                    Do not retension the cartridge tape.

Miscellaneous Control Options
     -sbin          Cause all stream files written to contain the binary
                    attribute (normally, output stream files contain the ASCII
                    attribute).

     -p             Cause rwmt to prompt for all unspecified parameters.

EXAMPLES
     Initialize a tape with the given owner and volume ID.

     $ rwmt -label -own "R and D" -vid "demo"


     Copy the wildcarded files to tape.

     $ rwmt -w c?*_example -f 1 -rf d -rl 200 -bl 2048
          32 records of "cmf_example" written to tape file  1.
           8 records of "cmt_example" written to tape file  2.
           4 records of "cpboot_example" written to tape file  3.
          25 records of "cpf_example" written to tape file  4.



     List the files on the tape.

     $ rwmt -index

     Volume label:
        Volume ID: "DEMO  "    Owner ID: "R AND D       "    Access: " "

     File/Section        File ID        Cr Date     Acc   RF     RL      BL
       1     1      CMF_EXAMPLE         83/02/17          D      200    2048
       2     1      CMT_EXAMPLE         83/02/17          D      200    2048
       3     1      CPBOOT_EXAMPLE      83/02/17          D      200    2048
       4     1      CPF_EXAMPLE         83/02/17          D      200    2048
       5     1      CPT_EXAMPLE         83/02/17          D      200    2048

     End of file set.
     $

     Copy tape file 3 to a disk file named cpboot_example.tape.

     $ rwmt -r cpboot_example.tape -f 3
     4 records read from tape file  3 into
       "cpboot_example.tape".
     $

     rwmt permits a tape file to be read in "raw" mode.  In this mode, each
     block read from the tape is written into one record in a stream file,
     unmodified by the program.  To read a file in "raw" mode, you should
     specify the maximum record size using the -rl argument. If you do not,
     the default value of 80 bytes is used, and any records longer than that
     are truncated.  Also, undefined record format should be used.  For
     example

     $ rwmt -r -f 1 -rf u -raw -rl 512 rawfile

     reads tape file number 1 into rawfile, with a maximum record length of
     512 bytes.

     Files may be written in the same manner:

     $ rwmt -w -f 1 -rf u -raw -rl 512 rawfile

     The file //backup/tmp1 is written out to the magnetic tape in "raw" mode.
     The record length is specified to be 8k and no byte swapping is done in
     software. This is useful for writing out an intermediate file to which
     wbak has written its output. Note that all tapes written by rwmt  must
     have a ANSI standard volume label for rbak to be able to read the tape

     rwmt -w -f 1 -raw -rl 8192 -nobs //backup/tmp1 -ansi

     If rwmt writes a file with -nobs option, you should use -nobs option to
     read it using rwmt.

SEE ALSO
     More information is available.  Type

     help rbak      For information on restoring or indexing a magnetic media
                    backup file

     help wbak      For information on creating a magnetic media backup file

     help media     For information on removable media

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026