home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / tools / vaxtape.doc < prev    next >
Encoding:
Text File  |  1988-05-03  |  7.3 KB  |  167 lines

  1.                     Vax_Tape Document File        
  2.  
  3. ---------------------------------------------------------------
  4. --        *****************************************          --
  5. --       ***   The Applied Research Laboratory   ***         --
  6. --      ***                 of the                ***        --
  7. --       ***    Pennsylvania State University    ***         --
  8. --        *****************************************          --
  9. ---------------------------------------------------------------
  10. --                                                           -*
  11. -- Author       : H. J. Clarke, A. F. Niessner, Jr.
  12. -- Unit Name    : program Vax_Tape.Ada
  13. -- Document     : ARL Internal Memorandum  87-176
  14. -- Version      : 1.0
  15. -- Release Date : October 3, 1987
  16. -- Last Update  : October 3, 1987
  17. --
  18. -- (c)  Copyright 1986 the Pennsylvania State University
  19. --                                                           -*
  20. ---------------------------------------------------------------
  21.  
  22.  
  23.  
  24. Subject:  An Ada Program to Write Text Files to Vax Compatible Tapes
  25.  
  26. Ref (a):  American National Standard Magnetic Tape labels and File
  27.           Structure for Information Interchange, ANSI X3.27-1978
  28.           Approved April 18, 1977, American National Standards
  29.           Institute, Inc.
  30.  
  31.  
  32. Abstract: A program Vax_Tape.Ada has been written in Ada to write text
  33.           files to a Vax compatible, ANSI standard, magnetic tape using
  34.           a Data General MV10000 computer running under AOS/VS and the
  35.           Ada ADE_Rev_240.  The Ada program requires an input file
  36.           named Vax_Tape.Files containing a tape label and a list of
  37.           files that are to be written to tape.  A Data General command
  38.           language program, Vax_Tape.Cli, has also been written that
  39.           takes a files list with, wild cards, on the command line,
  40.           generates the input file for the Ada program, then invokes
  41.           the Ada program to write the files to tape. 
  42.  
  43.  
  44.  
  45. I.    Purpose
  46.  
  47.      The program, Vax_Tape, was written to provide a straight forward
  48. method of transporting large sets of text files from a Data General
  49. computer to a DEC Vax computer.  The program uses a file, Vax_Tape.Files,
  50. which contains the tape label and a list of the files to be copied to tape
  51. as input.  A Data General command language program, Vax_Tape.Cli, has been
  52. written that takes a file list, with wild cards, on the command line and
  53. produces the file, Vax_Tape.Files, then invokes the ada program, Vax_Tape,
  54. which writes the files to tape.  A command switch, /label=, allows for the
  55. specification of the tape label on the command line.  If no label is given,
  56. a default label, DGTAPE, is used.  The file containing the tape label and
  57. the list of files written to tape, Vax_Tape.Files, is available after the
  58. tape has been written.
  59. II. Prerequisites
  60.  
  61.      This program uses the dynamic strings package, DYN.  This package is
  62. found in the Ada Repository in the Components subdirectory and is called
  63. dstr3.src. 
  64.  
  65.      When the Ada program, Vax_Tape, is to be run from the command line, a
  66. file, Vax_Tape.Files, must first be created that contains the tape label
  67. and a list of files to be written to tape.  The format for Vax_Tape.Files
  68. is given in Listing I.
  69.  
  70.      When the program is installed on a system for general use, the
  71. Vax_Tape.Cli needs to be modified to include the full path name to the
  72. Vax_Tape.Pr file.  The cli file contains a comment to this effect where the
  73. addition is required.
  74.  
  75.      The package body for Block_Tape_Write contains the logical name for
  76. the tape drive to be used.  The supplied file, Block_Tape_Write_b.ada,
  77. contains the tape drive name, @mtb0:.  This name should be changed to the
  78. name used on system where this program is being installed.
  79.  
  80.      Four Data General supplied packages, Current_Exception, sys_calls,
  81. string_conversion, and bit_ops, are used in the Vax_Tape program and must
  82. be in the libsearch path when the program is being compiled and linked.
  83.  
  84.  
  85. III. Use
  86.  
  87.      The Vax_Tape program can be executed in two ways: 1) by running the
  88. command file, Vax_Tape.cli with the list of files to be written specified
  89. on the command line or 2) by executing the Ada program, Vax_Tape, directly
  90. where the list of files to be written to tape are contained in a file,
  91. Vax_Tape.Files.  Prior to running the program, a tape must be physically
  92. mounted on the named tape drive.
  93.  
  94.  
  95.      1.   Command Line Option
  96.  
  97.           The command for this method of running the Vax_Tape program is:
  98.  
  99.                vax_tape[/label='Label'] files1 [files2 ...] 
  100.  
  101.           where the label switch is optional and the files parameters may
  102.           contain wild cards and may be repeated as often as needed.  This
  103.           option uses the command language program, Vax_Tape.Cli, to
  104.           generate the file, Vax_Tape.Files, to which the list of files to
  105.           be written to tape is written.  It then executes the Ada program
  106.           Vax_Tape which reads the file, Vax_Tape.Files, and writes the
  107.           files to tape.  Since wild card inputs are expanded by
  108.           Vax_Tape.Cli, the file, Vax_Tape.Files, is saved following the
  109.           tape write so that it may be determined which files were written
  110.           to tape and what tape label was written to the tape.
  111.  
  112.                The tape label may be furnished from the command line using
  113.           the /label= switch.  The label must be no more than 6 characters
  114.           so that longer labels will be truncated.  If no label is
  115.           specified, a default tape label of DGTAPE is used.  The tape
  116.           label is written to the first line of the file, Vax_Tape.Files.
  117.     2.   Vax_Tape.Files Option
  118.  
  119.           When a long list of files are to be written to tape, it may be
  120.           more convenient to prepare the file, Vax_Tape.Files prior to
  121.           running the Ada program, Vax_Tape.  The format for the file,
  122.           Vax_Tape.Files, is given in Listing I.  Given that the
  123.           Vax_Tape.Files file is prepared, the program is executed with the
  124.           command:
  125.  
  126.                x vax_tape
  127.  
  128.  
  129. IV.  Capabilities and Limitations
  130.  
  131.      This program has been written for use on a Data General computer
  132. running under AOS/VS.  It's use is intended for the transfer of text files
  133. from the Data General to a DEC Vax computer using a magnetic tape media. 
  134. The tape format follows the standard for magnetic tapes given in
  135. reference a.  The magnetic tape is directly readable on the Vax using the
  136. standard Vax commands such as dir, type, copy, etc.
  137.  
  138.  
  139. V.   Compilation Order
  140.  
  141.      The compilation order is given in the command language program,
  142. Compile_Vax_Tape.cli.  This is a cli that will compile and link the files
  143. needed for the Vax_Tape program on a Data General Computer running the Data
  144. General ADE.
  145.  
  146.  
  147. VI.  Testing
  148.  
  149.      This program has been tested by writing several test tapes on a Data
  150. General computer and then transferring the files to a DEC Vax computer.
  151.  
  152.  
  153.  
  154.  
  155.                 Listing I.  Sample File List Vax_Tape.Files
  156.  
  157.  
  158.           Tape Label = DGTEST
  159.           :UDD:AFN:UNDERWATER_BODY_SP.ADA
  160.           :UDD:AFN:TRAJECTORY_DATA_SP.ADA
  161.           :UDD:AFN:UNDERWATER_BODY_B.ADA
  162.           :UDD:AFN:SAMPLE_TRAJECTORY.CMD
  163.           :UDD:AFN:TRAJECTORY_DATA_B.ADA
  164.           :UDD:AFN:ACTIVE_TRAJECTORY.ADA
  165.  
  166.  
  167.