home *** CD-ROM | disk | FTP | other *** search
- Vax_Tape Document File
-
- ---------------------------------------------------------------
- -- ***************************************** --
- -- *** The Applied Research Laboratory *** --
- -- *** of the *** --
- -- *** Pennsylvania State University *** --
- -- ***************************************** --
- ---------------------------------------------------------------
- -- -*
- -- Author : H. J. Clarke, A. F. Niessner, Jr.
- -- Unit Name : program Vax_Tape.Ada
- -- Document : ARL Internal Memorandum 87-176
- -- Version : 1.0
- -- Release Date : October 3, 1987
- -- Last Update : October 3, 1987
- --
- -- (c) Copyright 1986 the Pennsylvania State University
- -- -*
- ---------------------------------------------------------------
-
-
-
- Subject: An Ada Program to Write Text Files to Vax Compatible Tapes
-
- Ref (a): American National Standard Magnetic Tape labels and File
- Structure for Information Interchange, ANSI X3.27-1978
- Approved April 18, 1977, American National Standards
- Institute, Inc.
-
-
- Abstract: A program Vax_Tape.Ada has been written in Ada to write text
- files to a Vax compatible, ANSI standard, magnetic tape using
- a Data General MV10000 computer running under AOS/VS and the
- Ada ADE_Rev_240. The Ada program requires an input file
- named Vax_Tape.Files containing a tape label and a list of
- files that are to be written to tape. A Data General command
- language program, Vax_Tape.Cli, has also been written that
- takes a files list with, wild cards, on the command line,
- generates the input file for the Ada program, then invokes
- the Ada program to write the files to tape.
-
-
-
- I. Purpose
-
- The program, Vax_Tape, was written to provide a straight forward
- method of transporting large sets of text files from a Data General
- computer to a DEC Vax computer. The program uses a file, Vax_Tape.Files,
- which contains the tape label and a list of the files to be copied to tape
- as input. A Data General command language program, Vax_Tape.Cli, has been
- written that takes a file list, with wild cards, on the command line and
- produces the file, Vax_Tape.Files, then invokes the ada program, Vax_Tape,
- which writes the files to tape. A command switch, /label=, allows for the
- specification of the tape label on the command line. If no label is given,
- a default label, DGTAPE, is used. The file containing the tape label and
- the list of files written to tape, Vax_Tape.Files, is available after the
- tape has been written.
- II. Prerequisites
-
- This program uses the dynamic strings package, DYN. This package is
- found in the Ada Repository in the Components subdirectory and is called
- dstr3.src.
-
- When the Ada program, Vax_Tape, is to be run from the command line, a
- file, Vax_Tape.Files, must first be created that contains the tape label
- and a list of files to be written to tape. The format for Vax_Tape.Files
- is given in Listing I.
-
- When the program is installed on a system for general use, the
- Vax_Tape.Cli needs to be modified to include the full path name to the
- Vax_Tape.Pr file. The cli file contains a comment to this effect where the
- addition is required.
-
- The package body for Block_Tape_Write contains the logical name for
- the tape drive to be used. The supplied file, Block_Tape_Write_b.ada,
- contains the tape drive name, @mtb0:. This name should be changed to the
- name used on system where this program is being installed.
-
- Four Data General supplied packages, Current_Exception, sys_calls,
- string_conversion, and bit_ops, are used in the Vax_Tape program and must
- be in the libsearch path when the program is being compiled and linked.
-
-
- III. Use
-
- The Vax_Tape program can be executed in two ways: 1) by running the
- command file, Vax_Tape.cli with the list of files to be written specified
- on the command line or 2) by executing the Ada program, Vax_Tape, directly
- where the list of files to be written to tape are contained in a file,
- Vax_Tape.Files. Prior to running the program, a tape must be physically
- mounted on the named tape drive.
-
-
- 1. Command Line Option
-
- The command for this method of running the Vax_Tape program is:
-
- vax_tape[/label='Label'] files1 [files2 ...]
-
- where the label switch is optional and the files parameters may
- contain wild cards and may be repeated as often as needed. This
- option uses the command language program, Vax_Tape.Cli, to
- generate the file, Vax_Tape.Files, to which the list of files to
- be written to tape is written. It then executes the Ada program
- Vax_Tape which reads the file, Vax_Tape.Files, and writes the
- files to tape. Since wild card inputs are expanded by
- Vax_Tape.Cli, the file, Vax_Tape.Files, is saved following the
- tape write so that it may be determined which files were written
- to tape and what tape label was written to the tape.
-
- The tape label may be furnished from the command line using
- the /label= switch. The label must be no more than 6 characters
- so that longer labels will be truncated. If no label is
- specified, a default tape label of DGTAPE is used. The tape
- label is written to the first line of the file, Vax_Tape.Files.
- 2. Vax_Tape.Files Option
-
- When a long list of files are to be written to tape, it may be
- more convenient to prepare the file, Vax_Tape.Files prior to
- running the Ada program, Vax_Tape. The format for the file,
- Vax_Tape.Files, is given in Listing I. Given that the
- Vax_Tape.Files file is prepared, the program is executed with the
- command:
-
- x vax_tape
-
-
- IV. Capabilities and Limitations
-
- This program has been written for use on a Data General computer
- running under AOS/VS. It's use is intended for the transfer of text files
- from the Data General to a DEC Vax computer using a magnetic tape media.
- The tape format follows the standard for magnetic tapes given in
- reference a. The magnetic tape is directly readable on the Vax using the
- standard Vax commands such as dir, type, copy, etc.
-
-
- V. Compilation Order
-
- The compilation order is given in the command language program,
- Compile_Vax_Tape.cli. This is a cli that will compile and link the files
- needed for the Vax_Tape program on a Data General Computer running the Data
- General ADE.
-
-
- VI. Testing
-
- This program has been tested by writing several test tapes on a Data
- General computer and then transferring the files to a DEC Vax computer.
-
-
-
-
- Listing I. Sample File List Vax_Tape.Files
-
-
- Tape Label = DGTEST
- :UDD:AFN:UNDERWATER_BODY_SP.ADA
- :UDD:AFN:TRAJECTORY_DATA_SP.ADA
- :UDD:AFN:UNDERWATER_BODY_B.ADA
- :UDD:AFN:SAMPLE_TRAJECTORY.CMD
- :UDD:AFN:TRAJECTORY_DATA_B.ADA
- :UDD:AFN:ACTIVE_TRAJECTORY.ADA
-
-
-