home *** CD-ROM | disk | FTP | other *** search
- LOAD ADA REPOSITORY TAPES
-
- by
-
- A. F. Niessner, Jr.
-
-
- I. Program Installation
-
- Prior to compiling the program and it's supporting packages, the
- body of the package, AR_System_Dependent, should be modified to define
- the installation parameters. The variable, Tape_Drive_Name, is set to
- the logical name of the tape drive used to load the tapes. The
- starting, or home, directory is specified by the variable, AR_Directory.
- This directory must exist on the system. The name of the log file may
- be changed if desired. The dynamic strings package, DYN, is used by
- this program and must be compiled prior to compiling this program. The
- package DYN is found in the Ada repository under PD:<ADA.COMPONENTS>
- with the file name DSTR3.SRC.
-
- Once the AR_System_Dependent package body is modified for the
- installation, the program can be compiled and linked using the file,
- Compile_lart.cli. Once compiled and linked, the program is executed
- with the command execute Load_AR_Tape. A sample session is given in
- Listing I.
-
- When the program begins execution, a prompt asks if this is a
- first load or a restart. The response, either an 'f' or an 'r', may be
- either upper or lower case. The restart option is only used when it is
- necessary to restart the load process following a fatal load error
- which has been corrected. Prior to starting a tape reload, the past
- AR_Tape_Load.Log file should be saved since the program will overwrite
- the past file. A restart assumes that the file, Ada.crclst, has been
- loaded and the directory structure for storing the files has been
- constructed by a first load. Given a response, the program waits for
- an answer to a prompt asking if the tape is loaded. The tape record
- number and the file name are written to the screen as each file is
- being loaded from tape. As each tape load is completed, the program
- prompts the operator for an input asking whether another tape has been
- loaded or the loading process has been completed.
-
- The file, AR_Tape_Load.Log, contains a record of the files loaded.
- It contains the tape record number, the full path name of the file, and
- an indicator if the file was not in the Ada.crclst file. An
- abbreviated listing of the AR_Tape_Load.Log file is given in File
- Listing II.
-
-
- II. Program Description
-
- The program, Load_AR_Tape, was written to load the ANSI standard
- tapes received from the Ada repository into a Data General computer
- running under AOS/VS. The ANSI standard format used to create the Ada
- Repository tapes does not preserve the directory structure used to
- store the files. The file, Ada.Crclst, one of the first files on the
- tapes, contains a list of the files with their full path name. This
- information is used to create the same subdirectory structure as used
- in the Ada repository. The file load is automatic with prompts to the
- operator when the tapes need to be changed. An option for restarting
- the loading process in the middle of a tape is provided if a failure
- should occur part way through the loading process. A log of the
- loading process is provided which lists the number of each file on tape
- in the event that a single file needs to be loaded in the future. When
- the restart mode is selected, the old log file is overwritten. For
- this reason, the log file should be renamed or relocated in another
- subdirectory after a tape load.
-
-
- III. Prerequisites
-
- This program uses the dynamic strings package, DYN, found in the
- Ada repository in the PD:<ADA.COMPONENTS> subdirectory with the file
- name DSTR3.SRC. In order to access this package, DYN must be compiled
- and placed in a library which is included in the searchlist prior to
- compilation of the Load_AR_Tape program.
-
-
- IV. Capabilities and Limitations
-
- This program has been written for use on a Data General
- computer running under AOS/VS. A package, AR_System_Dependent,
- contains those routines that are system dependent and would need to be
- modified if the program were to be revised for use on another system.
-
- The directory structure for the files is not preserved in the ANSI
- standard tape recording format. In order to maintain the original
- directory structure, the file listing in Ada.crclist, one of the first
- files on the tape, is used to reconstruct the original directory
- structure and place the files in the proper subdirectory. Should this
- file not be present on the tape, another means of reconstructing the
- directory structure would have to be found.
-
- The Ada repository tapes are formatted with three tape files for
- each file from the repository. There is a header file, File Listing
- I-B, containing the file information, the data file itself, File Listing
- I-C, and a trailer file, File Listing I-D, again containing the file
- name. The first file on the tape, a header file, File Listing I-A,
- contains an extra line with the name of the tape included. The tape
- ends with a single file, File Listing I-E, identifying the end of the
- tape. The header and trailer files are read as 80 character lines.
- The file containing the file data is read as a character file with the
- data being divided into lines. Each line contains a set of four
- characters making up a four digit number specifying the number of
- characters in the line, including the four characters for the character
- count, and the data characters themselves. Reading this file line by
- line requires reading the four digits, converting them to an integer,
- subtracting four from the integer then reading the remaining characters
- for that line.
-
- Several problems were found in attempting to read the file data
- from the tapes. In rare instances, an extra character appeared in a
- data line. This is handled by a test for a digit in the number reading
- routine. A get was first used to read the remainder of the line. Some
- text formatting characters in the data terminated the read before the
- required characters. Use of the get_line procedure fixed this problem.
- Some files have a series of control z's following the last line of the
- file. This is detected as an error in reading a line and is reported
- in the log file. Reporting of errors when reading a file is limited to
- three per file. After the third error, the file load is terminated.
- In the tapes tested, the files with errors were found to have been
- loaded in tact so that no data was lost.
-
-
- V. Compilation Order
-
- The compilation order is given in the file, Compile_lart.cli, located
- in the paged file lart.src. This is a cli that will compile and link the
- files needed for the Load_AR_Tape program. It should be noted that the link
- command uses the mtop option with /MTOP=2. This is necessary since the
- program will terminate prematurely with a memory error if the default
- of 1 mega byte, mtop=1, is used.
-
-
- VI. Testing
-
- This program has been tested by loading a set of Ada repository,
- ANSI standard, tapes on the ARL Data General computer.
-
-
-
-
- Listing I
-
- Sample Tape Loading Session
-
-
- ) execute load_ar_tape
-
-
-
- *** Ada Repository Tape Loading Program ***
-
- *** Is this a first load Operation or ***
- *** is this a restart? ***
-
- Enter 'F' for a first load or 'R' for a restart ==> first load
-
-
- *** Mount the starting Ada Repository Tape ***
-
- Then press any character ===> g
-
- Loading the starting Ada Repository Tape.
-
-
- Getting 0 :disk2:ada_repository_3:ADA.CRCLST
- Getting 3 :disk2:ada_repository_3:ADA.RPT
- Getting 6 :disk2:ada_repository_3:ADA.SNP
- Getting 9 :disk2:ada_repository_3:FILEUSE.DOC
- Getting 12 :disk2:ada_repository_3:ADA_SQL:DAMES.CMM
- Getting 15 :disk2:ada_repository_3:ADA_SQL:DAMES.DOC
- Getting 18 :disk2:ada_repository_3:ADA_SQL:DAMES.PRO
- Getting 21 :disk2:ada_repository_3:ADA_SQL:DAMES.SRC
- Getting 24 :disk2:ada_repository_3:ADA_SQL:DAMESABS.DOC
- Getting 27 :disk2:ada_repository_3:ADA_SQL:DAMESSRC.DIS
- Getting 30 :disk2:ada_repository_3:ADA_SQL:DAMESVMS.DIS
-
-
-
-
- )
-
-
- File Listing I
-
- Typical Tape Files
-
-
- A. The First File on a Tape
-
- VOL1ADA1 D%KSIMTEL20 1 3
- HDR1ADA.CRCLST ADA1 00010001000142 86254 86254 000000DECSYSTEM20
- HDR2D0204800400 000000 ^0800
-
-
- B. A Header File
-
- HDR1DAMES.CMM ADA1 00010005000100 86254 86254 000000DECSYSTEM20
- HDR2D0204800400 000000 ^0800
-
-
- C. The Data File -- Partial Listing
-
- 00040015COMPILATION0015-----------0076No recompilation of the DAMES DBMS Interf
- ace has been attempted to date.0004000400040013EXECUTION0013---------0035No exe
- cution attempted to date.0004000400040011COMMENT0011-------00040077The DAMES DB
- MS Ada Interface was developed as a precursor effort for the 0070WMCCS Informat
- ion System (WIS). An executable version of the tool0069has been demonstrated,
- however, the tool has not been recompiled 0056or undergone testing since delive
- ry by the vendor. 00040075The DAMES DBMS Ada interface was among the R&D precu
- rsors developed to 0075define an Ada DBMS interface. It is provided for inform
- ation only and 0079its syntax should not be used as a basis to build an Ada int
-
-
- D. The Trailer File
-
- EOF1DAMES.CMM ADA1 00010005000100 86254 86254 000001DECSYSTEM20
- EOF2D0204800400 000000 ^0800
-
-
- E. The Last File on a Tape
-
- HDR1ADA1-FILE-0311 ADA1 00010311131170 86254 86254 000000DECSYSTEM20
- HDR2U0040000000 X000000 ^3600
-
-
-
-
- File Listing II
-
-
-
- Ada Repository Tape Load Log File
-
- Date: 3/ 5/87
-
- File No. Full Path File Name File Check
-
- The Tape Name is: VOL1ADA1
-
- 0 :disk2:ada_repository_3:ADA.CRCLST
- 3 :disk2:ada_repository_3:ADA.RPT
- 6 :disk2:ada_repository_3:ADA.SNP
- 9 :disk2:ada_repository_3:FILEUSE.DOC
- 12 :disk2:ada_repository_3:ADA_SQL:DAMES.CMM
- 15 :disk2:ada_repository_3:ADA_SQL:DAMES.DOC
- 18 :disk2:ada_repository_3:ADA_SQL:DAMES.PRO
- 21 :disk2:ada_repository_3:ADA_SQL:DAMES.SRC
- 24 :disk2:ada_repository_3:ADA_SQL:DAMESABS.DOC
- 27 :disk2:ada_repository_3:ADA_SQL:DAMESSRC.DIS
- 30 :disk2:ada_repository_3:ADA_SQL:DAMESVMS.DIS
-
-
-
- End of the Log File data.
-
-