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

  1.                     LOAD ADA REPOSITORY TAPES
  2.  
  3.                                by
  4.  
  5.                        A. F. Niessner, Jr.
  6.  
  7.  
  8. I.   Program Installation
  9.  
  10.      Prior to compiling the program and it's supporting packages, the
  11. body of the package, AR_System_Dependent, should be modified to define
  12. the installation parameters.  The variable, Tape_Drive_Name, is set to
  13. the logical name of the tape drive used to load the tapes.  The
  14. starting, or home, directory is specified by the variable, AR_Directory.
  15. This directory must exist on the system.  The name of the log file may
  16. be changed if desired.  The dynamic strings package, DYN, is used by
  17. this program and must be compiled prior to compiling this program.  The
  18. package DYN is found in the Ada repository under PD:<ADA.COMPONENTS>
  19. with the file name DSTR3.SRC.
  20.  
  21.      Once the AR_System_Dependent package body is modified for the
  22. installation, the program can be compiled and linked using the file,
  23. Compile_lart.cli.  Once compiled and linked, the program is executed
  24. with the command execute Load_AR_Tape.  A sample session is given in
  25. Listing I.
  26.  
  27.      When the program begins execution, a prompt asks if this is a
  28. first load or a restart.  The response, either an 'f' or an 'r', may be
  29. either upper or lower case.  The restart option is only used when it is
  30. necessary to restart the load process following a fatal load error
  31. which has been corrected.  Prior to starting a tape reload, the past
  32. AR_Tape_Load.Log file should be saved since the program will overwrite
  33. the past file.  A restart assumes that the file, Ada.crclst, has been
  34. loaded and the directory structure for storing the files has been
  35. constructed by a first load.  Given a response, the program waits for
  36. an answer to a prompt asking if the tape is loaded.  The tape record
  37. number and the file name are written to the screen as each file is
  38. being loaded from tape.  As each tape load is completed, the program
  39. prompts the operator for an input asking whether another tape has been
  40. loaded or the loading process has been completed.
  41.  
  42.      The file, AR_Tape_Load.Log, contains a record of the files loaded. 
  43. It contains the tape record number, the full path name of the file, and
  44. an indicator if the file was not in the Ada.crclst file.  An
  45. abbreviated listing of the AR_Tape_Load.Log file is given in File
  46. Listing II.
  47.  
  48.  
  49. II.  Program Description
  50.  
  51.      The program, Load_AR_Tape, was written to load the ANSI standard
  52. tapes received from the Ada repository into a Data General computer
  53. running under AOS/VS.  The ANSI standard format used to create the Ada
  54. Repository tapes does not preserve the directory structure used to
  55. store the files.  The file, Ada.Crclst, one of the first files on the
  56. tapes, contains a list of the files with their full path name.  This
  57. information is used to create the same subdirectory structure as used
  58. in the Ada repository.  The file load is automatic with prompts to the
  59. operator when the tapes need to be changed.  An option for restarting
  60. the loading process in the middle of a tape is provided if a failure
  61. should occur part way through the loading process.  A log of the
  62. loading process is provided which lists the number of each file on tape
  63. in the event that a single file needs to be loaded in the future.  When
  64. the restart mode is selected, the old log file is overwritten.  For
  65. this reason, the log file should be renamed or relocated in another
  66. subdirectory after a tape load.
  67.  
  68.  
  69. III. Prerequisites
  70.  
  71.      This program uses the dynamic strings package, DYN, found in the
  72. Ada repository in the PD:<ADA.COMPONENTS> subdirectory with the file
  73. name DSTR3.SRC.  In order to access this package, DYN must be compiled
  74. and placed in a library which is included in the searchlist prior to
  75. compilation of the Load_AR_Tape program.
  76.  
  77.  
  78. IV. Capabilities and Limitations
  79.  
  80.      This program has been written for use on a Data General     
  81. computer running under AOS/VS.  A package, AR_System_Dependent,
  82. contains those routines that are system dependent and would need to be
  83. modified if the program were to be revised for use on another system.
  84.  
  85.      The directory structure for the files is not preserved in the ANSI
  86. standard tape recording format.  In order to maintain the original
  87. directory structure, the file listing in Ada.crclist, one of the first
  88. files on the tape, is used to reconstruct the original directory
  89. structure and place the files in the proper subdirectory.  Should this
  90. file not be present on the tape, another means of reconstructing the
  91. directory structure would have to be found.
  92.  
  93.      The Ada repository tapes are formatted with three tape files for
  94. each file from the repository.  There is a header file, File Listing
  95. I-B, containing the file information, the data file itself, File Listing
  96. I-C, and a trailer file, File Listing I-D, again containing the file
  97. name.  The first file on the tape, a header file, File Listing I-A,
  98. contains an extra line with the name of the tape included.  The tape
  99. ends with a single file, File Listing I-E, identifying the end of the
  100. tape.  The header and trailer files are read as 80 character lines. 
  101. The file containing the file data is read as a character file with the
  102. data being divided into lines.  Each line contains a set of four
  103. characters making up a four digit number specifying the number of
  104. characters in the line, including the four characters for the character
  105. count, and the data characters themselves.  Reading this file line by
  106. line requires reading the four digits, converting them to an integer,
  107. subtracting four from the integer then reading the remaining characters
  108. for that line.
  109.  
  110.      Several problems were found in attempting to read the file data
  111. from the tapes.  In rare instances, an extra character appeared in a
  112. data line.  This is handled by a test for a digit in the number reading
  113. routine.  A get was first used to read the remainder of the line.  Some
  114. text formatting characters in the data terminated the read before the
  115. required characters.  Use of the get_line procedure fixed this problem. 
  116. Some files have a series of control z's following the last line of the
  117. file.  This is detected as an error in reading a line and is reported
  118. in the log file.  Reporting of errors when reading a file is limited to
  119. three per file.  After the third error, the file load is terminated. 
  120. In the tapes tested, the files with errors were found to have been
  121. loaded in tact so that no data was lost.
  122.  
  123.  
  124. V.  Compilation Order
  125.  
  126.      The compilation order is given in the file, Compile_lart.cli, located
  127. in the paged file lart.src.  This is a cli that will compile and link the
  128. files needed for the Load_AR_Tape program.  It should be noted that the link
  129. command uses the mtop option with /MTOP=2.  This is necessary since the
  130. program will terminate prematurely with a memory error if the default
  131. of 1 mega byte, mtop=1, is used.
  132.  
  133.  
  134. VI.   Testing
  135.  
  136.      This program has been tested by loading a set of Ada repository,
  137. ANSI standard, tapes on the ARL Data General computer.
  138.  
  139.  
  140.  
  141.  
  142.                                 Listing I
  143.  
  144.                         Sample Tape Loading Session
  145.  
  146.  
  147. ) execute load_ar_tape
  148.  
  149.  
  150.  
  151.    ***   Ada Repository Tape Loading Program   ***
  152.  
  153.    ***   Is this a first load Operation or     ***
  154.    ***   is this a restart?                    ***
  155.  
  156.    Enter 'F' for a first load or 'R' for a restart ==> first load
  157.  
  158.  
  159.    ***  Mount the starting Ada Repository Tape  ***
  160.  
  161.         Then press any character  ===> g
  162.  
  163.         Loading the starting Ada Repository Tape.
  164.  
  165.  
  166. Getting     0   :disk2:ada_repository_3:ADA.CRCLST
  167. Getting     3   :disk2:ada_repository_3:ADA.RPT
  168. Getting     6   :disk2:ada_repository_3:ADA.SNP
  169. Getting     9   :disk2:ada_repository_3:FILEUSE.DOC
  170. Getting    12   :disk2:ada_repository_3:ADA_SQL:DAMES.CMM
  171. Getting    15   :disk2:ada_repository_3:ADA_SQL:DAMES.DOC
  172. Getting    18   :disk2:ada_repository_3:ADA_SQL:DAMES.PRO
  173. Getting    21   :disk2:ada_repository_3:ADA_SQL:DAMES.SRC
  174. Getting    24   :disk2:ada_repository_3:ADA_SQL:DAMESABS.DOC
  175. Getting    27   :disk2:ada_repository_3:ADA_SQL:DAMESSRC.DIS
  176. Getting    30   :disk2:ada_repository_3:ADA_SQL:DAMESVMS.DIS
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.                                     File Listing I
  184.  
  185.                                  Typical Tape Files
  186.  
  187.  
  188. A.   The First File on a Tape
  189.  
  190. VOL1ADA1                             D%KSIMTEL20  1                            3
  191. HDR1ADA.CRCLST       ADA1  00010001000142 86254 86254 000000DECSYSTEM20        
  192. HDR2D0204800400                      000000    ^0800                            
  193.  
  194.  
  195. B.   A Header File
  196.  
  197. HDR1DAMES.CMM        ADA1  00010005000100 86254 86254 000000DECSYSTEM20        
  198. HDR2D0204800400                      000000    ^0800                            
  199.  
  200.  
  201. C.   The Data File  -- Partial Listing
  202.  
  203. 00040015COMPILATION0015-----------0076No recompilation of the DAMES DBMS Interf
  204. ace has been attempted to date.0004000400040013EXECUTION0013---------0035No exe
  205. cution attempted to date.0004000400040011COMMENT0011-------00040077The DAMES DB
  206. MS Ada Interface was developed as a precursor effort for the 0070WMCCS Informat
  207. ion System (WIS).  An executable version of the tool0069has been demonstrated,
  208. however, the tool has not been recompiled 0056or undergone testing since delive
  209. ry by the vendor.  00040075The DAMES DBMS Ada interface was among the R&D precu
  210. rsors developed to 0075define an Ada DBMS interface.  It is provided for inform
  211. ation only and 0079its syntax should not be used as a basis to build an Ada int
  212.  
  213.  
  214. D.   The Trailer File
  215.  
  216. EOF1DAMES.CMM        ADA1  00010005000100 86254 86254 000001DECSYSTEM20        
  217. EOF2D0204800400                      000000    ^0800                            
  218.  
  219.  
  220. E.   The Last File on a Tape
  221.  
  222. HDR1ADA1-FILE-0311   ADA1  00010311131170 86254 86254 000000DECSYSTEM20        
  223. HDR2U0040000000                     X000000    ^3600                            
  224.  
  225.  
  226.  
  227.  
  228.                                    File Listing II
  229.  
  230.  
  231.  
  232.                Ada Repository Tape Load Log File
  233.  
  234.                                   Date:  3/ 5/87
  235.  
  236.   File No.  Full Path File Name                           File Check
  237.  
  238. The Tape Name is: VOL1ADA1
  239.  
  240.         0    :disk2:ada_repository_3:ADA.CRCLST
  241.         3    :disk2:ada_repository_3:ADA.RPT
  242.         6    :disk2:ada_repository_3:ADA.SNP
  243.         9    :disk2:ada_repository_3:FILEUSE.DOC
  244.        12    :disk2:ada_repository_3:ADA_SQL:DAMES.CMM
  245.        15    :disk2:ada_repository_3:ADA_SQL:DAMES.DOC
  246.        18    :disk2:ada_repository_3:ADA_SQL:DAMES.PRO
  247.        21    :disk2:ada_repository_3:ADA_SQL:DAMES.SRC
  248.        24    :disk2:ada_repository_3:ADA_SQL:DAMESABS.DOC
  249.        27    :disk2:ada_repository_3:ADA_SQL:DAMESSRC.DIS
  250.        30    :disk2:ada_repository_3:ADA_SQL:DAMESVMS.DIS
  251.  
  252.  
  253.  
  254. End of the Log File data.
  255.  
  256.