Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dd(8)

umask(2)



  ansitape(1)                         CLIX                         ansitape(1)



  NAME

    ansitape - Reads, writes, or creates ANSI-standard magnetic tapes

  SYNOPSIS

    ansitape [-] c|r|t|x [aefinqsv3] [mt=device] [vo=volume-name]
    [rs=[r|record-size]] [bs=block-size] [rf=[f|v]] [cc=[e|f|i]] filename ...
    [ac=*level]

  FLAGS

    The following flags specify the desired operation.  A minus sign (-) is
    allowed, but is optional, to introduce the first flag.

    c   Creates a new magnetic tape.  The tape is initialized with a new ANSI
        volume header.  All files previously on the tape are destroyed.  This
        flag implies the use of the r flag.

    r   Writes to a magnetic tape.

    t   Lists all filenames on the magnetic tape.

    x   Extracts all files from the tape.  Files are placed in the current
        directory.  Protection is read/write to everyone, modified by the
        current umask().

    The preceding flags may be followed by these additional flags:

    a   Reads or writes the tape with the ASCII character set.  This is the
        default.

    e   Writes the tape with the EBCDIC character set, using the same mapping
        as the dd command with conv=ebcdic.  This flag is automatically
        enabled if IBM format labels are selected.

    f   Sends file I/O to standard I/O instead.  For example, when writing a
        tape file to contain a lint listing, the following could be specified:

        lint xyz.c | ansitape rf xyz.lint

        instead of

        lint xyz.c > /tmp/xyz.lint
        ansitape r /tmp/xyz.lint
        rm /tmp/xyz.lint

        When reading, extracted files are sent to stdout instead of to a disk
        file.

    i   Uses IBM format tape labels, which are similar but not identical to



  2/94 - Intergraph Corporation                                              1






  ansitape(1)                         CLIX                         ansitape(1)



        the ANSI standard.  The major difference is that the tape will contain
        no HDR3 or HDR4 records and restricts the names of the files on the
        tape to 17 characters.  This flag automatically selects the EBCDIC
        character set for output.  To make an IBM format label on a tape using
        the ASCII character set, use the ia flag sequence.

    n   Prevents the tape from rewinding to the beginning before it is
        appended to; used with the r flag.  This flag has no effect if used
        with the c, t, or x flags.

    q   Queries before writing.  On write (c or r flags), ansitape asks before
        writing to the tape.  On extract operations, ansitape displays the
        CLIX pathname and asks if it should extract the file.  Any response
        starting with y or Y means yes, and any other response (including an
        empty line) means no.

    s   Enforces a strict ANSI standard.  This flag currently has the effect
        of assuming embedded carriage control when extracting files,
        regardless of the carriage control specified on the tape.

    v   Displays the name of each file ansitape treats, preceded by the flag.
        This also displays the volume name of each tape as it is mounted.
        When used with the t flag, ansitape displays the number of tape blocks
        used by each file, the record format, and the carriage control option.

    3   Does not write HDR3 or HDR4 labels.  HDR3 is reserved for the use of
        the operating system that created the file.  HDR4 is for overflow of
        filenames longer than the 17 characters allocated in the HDR1 label.
        Not all systems process or ignore these labels correctly.  This switch
        suppresses the HDR3 and HDR4 labels when the tape will be transferred
        to a system that cannot support these types of labels.

  DESCRIPTION

    The ansitape command reads, writes, and creates magnetic tapes conforming
    to the American National Standards Institute (ANSI) standard for magnetic
    tapes labeling.  Primarily, this is useful to exchange tapes with VAX/VMS
    systems, which make this kind of tape by default.

    The ansitape command is controlled by a flag (t, x, c, or r) that
    specifies the overall operation desired.  Other flags modify the format of
    the output tape.  Function modifiers may also be specified on the command
    line.

  Function Modifiers

    Function modifiers should be given as a separate argument to ansitape.
    Multiple modifiers may be specified.  They must appear after command-line
    flags and before any filename arguments.

    mt=device



  2                                              Intergraph Corporation - 2/94






  ansitape(1)                         CLIX                         ansitape(1)



           Selects an alternate drive on which the tape is mounted.  The
           default is /dev/rmt/0mn.

    vo=volume-name
           Specifies the name of the output volume.  Normally, this defaults
           to the first six characters of the login name.  The string UNIX is
           used as the default if ansitape cannot determine the login name.

    rs=record-size
           Specifies the output record size in bytes.  This is the maximum
           size in the case of variable-format files.  This modifier also
           turns on the fixed-record-format modifier.  Thus, for variable
           record sizes with a smaller maximum, the following must be
           specified:

           rs=record-size rf=v

           When the record size is manually given, ansitape does not read disk
           files to determine the maximum record length.

    rs=r   A variant of the rs= modifier that causes ansitape to read all disk
           files for record size, regardless of their size.  Normally, files
           larger than 100 K bytes are not scanned for record size.  Using
           this modifier also implies variable-length records.

    bs=block-size
           Specifies the output block size, in bytes.  As many records as will
           fit are written into each physical tape block.  ANSI standards
           limit this to 2048 bytes (the default), but more or less may be
           specified.  Specifying more may prevent some systems from reading
           the tape.

    rf=f   Specifies fixed-length record format.  This should be reserved for
           binary files.

    rf=v   Specifies variable-length record format (text files).  This is the
           default and normally should not be changed.

    cc=e   Specifies embedded carriage control.  Carriage control characters
           (if any) are part of the data records.  This is usually used with
           binary data files.

    cc=f   Specifies FORTRAN carriage control.  Each line is expected to start
           with a FORTRAN carriage-control character.  The ansitape command
           does not insert these characters automatically, but marks the file
           as having them.  This is of limited usefulness.

    cc=i   Specifies implied carriage control (the default).  Unlike CLIX text
           files where records are delimited by a newline character, ANSI
           files do not normally include the newline as part of the record.
           Instead, a newline is automatically added to the record whenever



  2/94 - Intergraph Corporation                                              3






  ansitape(1)                         CLIX                         ansitape(1)



           the record is sent to a printing device.

    ac=level
           Sets access level, where level is a single character assigned by
           the user to represent a security access code.  This is
           informational only, as it is not enforceable.

  Writing ANSI Tapes

    The list of files on the command line is written to the tape.  A full CLIX
    pathname may be specified.  However, only the last pathname component
    (everything after the last /) is used as the filename on the tape.

    Normally, regular text files are to be exchanged.  ansitape reads the
    files one line at a time and transfers them to the tape.  The newline
    character at the end of each line is removed, and the file is written in a
    variable-length record format.  Variable-format files have the length of
    the longest record specified in a file header.  Therefore, ansitape will
    read each input file from disk before the file is written to tape, to
    determine the maximum record size.  The read is skipped if the file is
    more than 100,000 bytes long.  The default carriage control (implied)
    instructs the other host to restore the newline character before printing
    the record.

    If ansitape assumes that the input file is a CLIX text file (FORTRAN or
    implied carriage control), it will automatically strip the CLIX newline
    from the end of each record.  Stripping is not done with embedded carriage
    control (cc=e) files.  If the size of a nontext file (cc=e) is not a
    multiple of the record size, the partial record at the end will be lost.

    For binary files, fixed-length records should be used.  VAX/VMS systems
    normally use a record length of 512 bytes for things like directories and
    executable files, but data files may have any record length.  Binary files
    should be flagged for embedded carriage control.

  Reading ANSI Tapes

    When reading, the input file list is presumed to be the names of files to
    be extracted from the tape.  The shell wildcard characters asterisk (*)
    and question mark (?) may be used; they must be quoted to prevent the
    shell from interpreting them before ansitape sees them.

    None of the modifiers for record format or carriage control need to be
    specified when reading files.  ansitape automatically picks up this
    information from the header records on the tape and runs accordingly.  If
    ansitape does not fulfill requirements, the resulting files may be run
    through dd(1).

  Multivolume Support

    When ansitape reaches the end of a tape while reading, it requests the



  4                                              Intergraph Corporation - 2/94






  ansitape(1)                         CLIX                         ansitape(1)



    next volume with the message Mount continuation tape and push return.
    However, the tape is not checked to ensure that the correct volume was
    mounted.

    When ansitape reaches the end of a tape it is writing, it requests the
    next volume as described previously.  When the new volume is online,
    ansitape initializes it with an ANSI volume header containing a volume
    name generated from the volume name of the first tape of the set.  If the
    original name is fewer than six characters long, it is padded to six
    characters with underscores (_).o Then the last two characters of the name
    are replaced by a two-digit sequence number.  For example, tap becomes
    tap_02, mylabl becomes myla02, and so forth.  The sequence number is the
    tape's position in the set.

  NOTES

    The ansitape command cannot be used with cartridge tape drives and 8mm
    tape drives, since these tape drives cannot backspace.

    The nth occurrence of a file cannot be requested.

    Filenames longer than 80 characters are truncated.  This is a limitation
    of the ANSI labeling standard.  If the tape is made without HDR3 and HDR4
    labels (3 or i switch), the name is limited to 17 characters.

    The record size of files transferred with embedded carriage control must
    be a multiple of the block size.

    The ansitape command is not case-sensitive; it maps uppercase filenames to
    lowercase filenames on the tape.  For example, file ABC would be stored on
    tape as file abc.

  FILES

    /dev/rmt/mt*  Magnetic tape interface

  RELATED INFORMATION

    Commands:  dd(8)

    Functions: umask(2)













  2/94 - Intergraph Corporation                                              5




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