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

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --NOTES.DOC
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. The following notes relate to the installation and use of the Rapport
  5. Ada interface on a VAX computer using Telesoft's Ada (subset) compiler versions
  6. 1.3 or 1.5. The user should read the entire set of notes before beginning the 
  7. installation.
  8.  
  9. Examples and additional information may be obtained by contacting:
  10.    Tim Porter
  11.    SAIC Comsystems, San Diego
  12.    UNITREP@NOSC-TECR
  13.    619-293-7500
  14. or
  15.    Logica Database Products Inc.
  16.    666 third Avenue
  17.    New York, N.Y. 10017
  18.    212-682-9344
  19.  
  20. ========================================
  21. Implementing the Rapport - Ada Interface
  22. ========================================
  23.  
  24. 1. The Rapport DBMS must be installed and available to the user.
  25.  
  26. 2. Compile USERCALL.FOR and link with the appropriate Rapport
  27.    interface modules referenced in the FORTRAN code.
  28.  
  29. 3. Edit the V23USR.MAR to change MESSAGEPIPE to reflect the location
  30.    of USERCALL.EXE.
  31.  
  32. 4. Assemble V23USR.MAR utilizing AV23.COM and link into Telesoft
  33.    utilizing LV23ROS.COM. (Refer to Telesoft documentation).
  34.  
  35. 5. Compile R8LIB.TXT.
  36.  
  37. 6. Follow the procedures detailed below to create applications.
  38.  
  39.  
  40. Production of a Database and Program
  41. ====================================
  42.  
  43. The early stages using RAPPORT are documented in the RAPPORT 'Facilities'
  44. manual and the manual 'Designing a Database'.  The writing of an Ada program
  45. is described in the Ada/RAPPORT Interface User Manual.  The stages in the 
  46. implementation of the hand generic method of database production is given
  47. below.
  48.  
  49. -   The logical names for Ada and RAPPORT and their help and command libraries
  50.     are set up in the "LOGIN.COM" file for RAPPVMS3.  RAPPORT might be
  51.     protected from access by other users.
  52.  
  53. -   Define the structure of the database in a RAPPORT Database Definition File.
  54.     The name of this file would normally be used for the package name of the
  55.     file independent RAPPORT procedures.  The filename extension should be
  56.     ".DDF".  If RAPIER or RAPIDE are to be used the standard ddf include
  57.     statements must be appended and a sort records statement added to the
  58.     beginning of the ddf.
  59.  
  60. -   'Compile' the ddf to give a Database Common File by using the Database
  61.     Definition Processor (DDF).  This produces a file with the same name and
  62.     an extension of ".DCF".
  63.  
  64. -   The database files must then be created.  The RAPPORT utility DBS creates
  65.     files with the correct structure, prompting for the filenames to be
  66.     created.
  67.  
  68. -   If RAPIER or RAPIDE are to be used the program PREPARE must be used to
  69.     initialize their data areas.
  70.  
  71. -   The contents of the other files can be initialized by RAPIDE (RAPPORT's
  72.     prototyping language) or RAPIER (Screen Data Entry package).
  73.  
  74. -   The DCF checksums must be obtained.  This can be done by setting up a
  75.     dummy FORTRAN/RAPPORT program called "TEST.CPI".  It can have the form
  76.  
  77.         PROGRAM TEST
  78.         FILES ( filename )
  79.         STARTRAPPORT( JTASK, JERROR )
  80.         ENDRAPPORT( JTASK )
  81.         END
  82.  
  83.     The program must be pre-processed using the RAPPORT Command Processor
  84.     (RCP).  The resulting program, "TEST.FOR", contains the basic calls to
  85.     RAPPORT.  The values for LAST_FILE and CHECKSUM are given in the subroutine
  86.     call to R0STAR.  Eg
  87.  
  88.       CALL R0STAR(' ',1,.FALSE.,
  89.       14,9295,jtask,jerror)
  90.  
  91.     The LAST_FILE is the fourth argument (14), the CHECKSUM the fifth (9295).
  92.  
  93. -   create a new subdirectory to [ADARAPP] for the 'instantiated' Ada packages.
  94.  
  95. -   Instantiate the top level RAPPORT package using the editor.  This 'generic
  96.     package' is called PERDDF.TXT and resides in the directory
  97.     [adarapp.generics].  If it is edited and substitutions made the new copy
  98.     must be placed in the new application subdirectory. (NB EDT takes its
  99.     default directory to be that of the file it is editing).  The instructions
  100.     for instantiating the package are in the package header.
  101.  
  102. -   Compile the top level package.
  103.  
  104. -   Instantiate and compile the file level 'generic package' for each file to
  105.     be used in the application.  The file number required in this package can
  106.     be found from the order of definition of files in the ddf.  (The first
  107.     file being 1, the next 2, and so on).  The record structure is defined in
  108.     this package and its translation from the ddf is defined in the User
  109.     Manual.  (See below)
  110.  
  111. -   Instantiate and compile the field level 'generic package' for each field to
  112.     be used in a retrieval condition or ordering condition by the application.
  113.     The field number required in this package can be found from the order of
  114.     definition of fields in the ddf. (This is an absolute count of fields
  115.     starting from the first field in the ddf.)
  116.  
  117. The order of compilation of these packages is important since they use the
  118. context of packages compiled at previous levels.  You are now ready to write
  119. an application program.  
  120.  
  121. Once it has been written and compiled a nucleus must be started.  It can be
  122. either run on a terminal or submitted to the batch queue.  Running a nucleus
  123. on the terminal can be done by the RAPPORT DCL command NUCLEUS.  The command
  124. file to run a nucleus in the batch queue is
  125.  
  126.     NUCLEUS
  127.     <a mailbox name used to identify the nucleus, eg ADANUC>
  128.     <the dcf file name>
  129.     ENTER
  130.     CONT
  131.     EXIT
  132.  
  133. A nucleus run in the batch queue by this method may be stopped by the service
  134. command.  Eg
  135.  
  136.     SERVICE/NAME=<mailbox name>
  137. Differences between the User Manual and the Prototype Implementation
  138. ====================================================================
  139.  
  140. are listed below.
  141.  
  142. -   RAPPORT on a VAX uses 32 bit integers so, where the type INTEGER is
  143.     used in the User Manual, the Telesoft-Ada program needs a declaration
  144.     of LONG_INTEGER.
  145.  
  146. -   Normally record type definitions would be placed in the same package
  147.     as the instantiations.  In the prototype they are defined in the package
  148.     for each file and is named DB_RECORD.  A declaration of a database
  149.     record would then be
  150.  
  151.         REC : file.DB_RECORD;
  152.