










                                       WOMBAT EXAMINER

                                    May 1980  Vol.2 No.1





                                                                                2
                 Welcome  to the second issue of the WOMBAT EXAMINER.  If the cover
        does not make sense, you need to invoke the following DATATRIEVE commands:

                                         HELP WOMBAT

                                    HELP ADVANCED WOMBAT

        Our  thanks  to  the contributor of this issue's cover design, Mrs. Carla
        Marshall  from  DECUS,  UK.    A copy of the letter is included in this
        newsletter.

                                      LIST OF CONTENTS

        Alternate Record Descriptions

        Commands vs. Statements

        DATATRIEVE Support for DBMS-11

        DATATRIEVE V2.0 Preview

        DATATRIEVE Wishlist - DECUS Fall '79

        Wombat Magic

        User Contributions

        FORTRAN Support for the DEC Record Manager




                                                                              3
                                INSTRUCTIONS FOR CONTRIBUTORS

        Contributions should be sent to:

                 Editor, DATATRIEVE Newsletter
                 c/o DECUS, One Iron Way
                 MR2-3/E55
                 Marlboro, MA 17562

        Letters and articles for publications are requested from members of the SIG.
        They  may  include helpful hints, inquiries to other users, reports are SIG
        business,  summaries  of SPRs submitted to Digital or other information for
        members of the DATATRIEVE SIG.  Camera ready copy is appreciated, but almost
        anything legible will be considered.  However, this newsletter is not a forum
        for job and/or head hunting, nor is commercialism appropriate.

        NAMES OF CONTACTS

        The  following SIG members have volunteered to receive phone calls regarding
        DATATRIEVE.    Please remember that your phone call is an interruption of a
        full-time  obligation to their employer.  Prepare your questions beforehand
        and limit the call to 15-20 minutes.  Additional volunteers will be listed in
        the next issue.

        CONTACTS

                 Beth Carter               Bob Mc Cormick
                 Bridgeport-Textron        Farm Credit Banks of Springfield
                 200 Precision Rd.         P.O. Box 141
                 Horsham, PA  19044        Springfield, MA  01101

                 Joan Hilton
                 G.D. Searle
                 P.O. Box 5110
                 Chicago, IL  60680
                 312/982-4631

        SIG CHAIRMAN:                      NEWSLETTER EDITOR:

                 Chuck Watson                            Kathy Tamer
                 Pacific Northwest Laboratories          G.E./MATSCO
                 Batelle Northwest                       1050 Bay Area Blvd.
                 Richland, WA  99352                     Houston, TX  77058
                 509/943-1462                            713/483-5975
                                                         FTS 525-5975

        NOTE:    Both  Kathy and Chuck's phone numbers have changed since the last
        issue.




                                                                               4
                         ALTERNATE RECORD DESCRIPTION MAY SAVE SPACE


                 Several  users  have had trouble using Report Writer or developing
        large  procedures  with large records.  They have defined elaborate records
        which  work fine with simple keyboard commands or statements.  However, when
        RW or lengthy procedures are invoked, they encounter - STORAGE POOL EXAUSTED.

                 A  possible  solution is to re-examine the record description and
        eliminate  as  many  characters  as  possible, becuase the entire record
        description  is in the storage pool.  Suggestions for condensing the record
        description  include:    1)  reduce  the number of fields, 2) get rid of
        redefines, 3) valid IFs, 4) use FINISH, reduce number of open files.

                 In  many  cases such drastic surgery is not necessary.  After all,
        that elaborate record description probably was developed to make interactive
        usage  simple and elegant.  It is the routine uses such as Report Writer and
        procedures  which  tend  to  exhaust the storage pool.  Why not establish
        alternate  record descriptions for the same record?  The new description can
        eliminate  the  QUERY-NAMEs  because  you can put the field names in the
        procedure.  Often the procedure will not need all the fields, so they can be
        replaced with FILLER in the alternate record description.

                 Establish alternate domain definitions which link the original file
        to the new record definition.  Add a READY [alternate domain] command in the
        procedure.    If the procedure also SINISHes the alternate domain, the user
        will not be aware that you have provided a shorter record description.

                 SUMMARY - Each character in the record description costs you storage
        pool  space.    Sometimes  you can use a less elaborate alternate record
        description  of  the same file to increase pool space for procedures and/or
        Report Writer.




                                                                             5
                                       VERSION 2. & 1.


                                    COMMAND vs STATEMENTS


                                             or


                                 You can REPEAT n PRINT "ME"
                                             but
                                you cannot REPEAT n HELP ME.


                 There  is  a  lot  of  confusion regarding the use of compound
        expressions  in  DATATRIEVE.  There appears to be a notion that THEN may be
        used  at  any time to combine things.  One reason for the confusion is the
        blury  use  of the words "command" and "statement" in the documentation for
        Version  1.    The field test documentation for Version 2 makes a clearer
        distinction between them.  It also helps to have an understanding of the way
        DATATREIVE  parses your input.  Even after reading the new documentation, I
        was  still not sure of the distinction, so I re-wrote the definitions in my
        own words as follows:

                 SENTENCE   A  SENTENCE is a logical line of input.  It may be
                            terminated  with a semicolon, or DATATREIVE may use
                            it's  parsing rules to decide that the SENTENCE is
                            complete as shown in Chapter 3 of V-1 User's Guide.
                            SENTENCES  are composed of a COMMAND or one or more
                            STATEMENTS which invoke DATATRIEVE actions.

                 COMMAND    A COMMAND and its associated arguments (if any) is a
                            SIMPLE sentence.

                 and

                 STATEMENT  A  STATEMENT and its associated arguments (if any)
                            may be a SIMPLE sentence, or it may be combined with
                            other  statements  and arguments to form a COMPLEX
                            sentence.

                   These lead to two rules:

                 1) A SIMPLE SENTENCE CONTAINS ONE COMMAND OR STATEMENT,
                 and
                 2) A COMPLEX SENTENCE CONTAINS SEVERAL STATEMENTS.

                 One way to decide if something is a statement or command is to
        think in terms of the REPEAT statement.  You cannot REPEAT n [command],
        but you can REPEAT n [statement].  For example, REPEAT 5 READY [domain]
        is  illegal and illogical, while REPEAT 5 STORE [domain] is both legal
        and logical.

                 Another  way  of  knowing if a proposed complex sentence is
        legally  constructed as a combination of statements is to refer to the
        following table, abstracted from the new User's Guide.





                                                                              6
                                   version 1.1 & 2.0

                    Alphabetical Summary of Commands and Statements

         Command/Statement  Type      Function

         ABORT                    S   Ends  statement,  procedure, or command file
                                      execution
        *ADT                  C       Invokes Application Design Tool (ADT)
         assignment               S   Establishes the value of a field or variable
         BEGIN-END                S   Groups statements for execution
         CLOSE                C       Closes session trace file
        *DECLARE              C   S   Defines a variable
        *DEFINE DICTIONARY    C       Creates a private data dictionary
         DEFINE DOMAIN        C       Creates a domain definition
         DEFINE FILE          C       Creates a data file for a domain
         DEFINEP              C       Adds an entry to a password table
         DEFINE PROCEDURE     C       Creates a procedure definition
         DEFINE RECORD        C       Creates a record definition
        *DEFINE TABLE         C       Creates code-and-description table definition
         DELETE               C       Removes a definition froma data dictionary
         DELETEP              C       Removes an entry from a password table
        *DISPLAY                  S   Prints a value
         EDIT                 C       Invokes the DATATRIEVE editor
         ERASE                C       Deletes record(s) from a data file
         EXIT (CTRL Z)        C       Terminates a DATATRIEVE session
        *EXTRACT              C       Copies  a  definition to an indirect command
                                      file
         FIND                 C       Retrieves  records  and establishes current
                                      collection
         FINISH               C       Releases domain(s) and associated collections
         FOR                      S   Applies statement(s) to selected records
         HELP                 C       Provides    online   assistance   with
                                      commands/statements
         IF-THEN-ELSE             S   Executes  either of 2 statements depending on
                                      evaluation of Boolean expression
         MODIFY                   S   Changes field(s) of specified records
         OPEN                 C       Opens session trace file
         PRINT                    S   Prints  specified  field(s)  of  specified
                                      record(s)
         READY                C       Readies a domain for use
         RELEASE              C       Releases   named  collections,  code-and-
                                      description tables, or global variables
         REPEAT                   S   Executes  a  statement a specified number of
                                      times
         REPORT               C       Invokes the Report Writer
         SELECT                   S   Selects a record in a collection
         SET                  C       Established the current data dictionary, sets
                                      the  maximum  number  of columns per page,
                                      inhibits or permits aborts, starts Guide Mode,
                                      and inhibits or permits statement prompting
         SHOW                 C       Prints  information about the data dictionary
                                      and its contents
         SHOWP                C       Prints a password table
         SORT                 C       Sorts records in a collection
         STORE                    S   Stores a record in a domain
        *TOTAL                    S   Prints  the  total of contents of specified
                                      field(s)

        *version 2.0




                                                                              7
                       Datatrieve Support for DBMS-11: A DECUS Report


        On the third day of the fall DECUS Symposium DEC "officially" introduced the
        DBMS-11 users to Datatrieve, and vice versa.  This account is the impression
        left by that session on one DBMS(IAS)/Datatrieve(TSTS) user, aided by notes,
        hampered  by  a  lack of slide copies, unfettered by electronic recording
        devices, and clouded by a strenuous holiday season.

        The presentation was given by Brent Sadler, with Jim Starky hovering by cum
        the  Ghost of Christmas Past.  The audience was, predictably, a mixture of
        DBMS users with no Datatrieve experience, Datatrieve users with minimal DBMS
        exposure,  a  few  users  running both and invariably frustrated by the
        inability  of  these two data management tools to act in concert, and the
        blessed few (DEC and, I believe, certain RSX-11M field test sites) who have
        had  experience with DBMS V1.8 and Datatrieve V2.0 releases.  Brent's slide
        presentation  anticipated  the spectrum of users, offering first a DBMS-11
        overview, then a Datatrieve overview, and finally a description of what the
        marriage  consists  of.    The omnipresent and fruitful Q and A session
        followed.

        The  DBMS-11 overview concentrated on definitions of the components of the
        system;  Data Definition Language (DDL), Data Manipulation Language (DML),
        record, set, schema, subschema, etc.  The various possible routes of access
        with  DBMS-11  were  outlined, and examples were given of record and set
        occurrences.   The DBMS-11 data dictionary, schema, and subschema concepts
        were introduced, and how they work together to form a data management system
        covered briefly.

        The  Datatrieve overview outlined the use of this query language for ad hoc
        inquiries, ad hoc additions, delections, modifications, what-have-you.  The
        arithmetic and statistical talents of Datatrieve were mentioned, as was the
        report-writer  feature.   Another data dictionary was introduced, this one
        being  the  Datatrieve  edition,  in  which live the record and domain
        definitions, the procedure definitions, password information, and wombats.

        The  extension  of  Datatrieve  to DBMS-11 files was described by first
        reworking  the  definition of a Datatrieve domain.  For RMS files, a V1.1
        Datatrieve domain has been all the records in a specified file.  For DBMS-11
        files,  a  Datatrieve domain becomes all record occurrences of a specified
        record  type.    Applied to DBMS-11 files, Datatrieve can effect boolean
        retrievals,  create collections, sort them, perform arithmetic calculations
        on  fields, modify data (egad!), and of course bundle all the above in the
        tidy fashions one has defined through the report-writer facility.  There are
        extensions  to  the record-selection-expression syntax to accommodate the
        relationships  inherent in a Codasyl-spec. database management system; for
        example,  a  "within"  variant  allows one to find all members in a set
        occurrence,  and  an  "owner"  construct allows that relationship to be
        expressed.




                                                                                 8
        Having  opened the doors to the kingdom, so to speak, Brent then opened for
        questions and comments from the floor.  One of the first addressors was Sat
        Mohan, Chairman of the DBMS SIG, who related that (and here I paraphrase) he
        had just been accosted by a little man (with florid features, a long pointy
        tail  and  some  manner of pitchfork) who distinctly said, "Brother, it's
        frozen over."  As long-time users of DBMS-11, we can heartily endorse Sat's
        sentiments  ---  DBMS-11 from its very inception has needed, and has been
        promised,  an  inquiry/report-writer facility and considering that such a
        facility is something one tends to take for granted in a database management
        package, the on-going lack of the inquiry/report-writer feature has taken on
        some  of  the nature of death, taxes, and the poor, ie. a sort of storied
        permanence.

        Ahem.    The  Q's and A's. Please bear in mind that these are culled from
        notes,  not tapes, and that in certain parts of the forest my notes have a
        strong  family  resemblence  to that famous bladeless knife which had no
        handle.  Following the usual DECUS format...

          Q.  Is the CALC key used?
          A.  Yes,  Datatrieve  uses  the  CALC key as appropriate, and does it
              invisibly.
          Q.  Is it possible to use Datatrieve to retrieve DBKEY values?
          A.  No,  but  that would be a Good Thing.  (The wish lists starts on the
              second question.  It was ever thus.)
          Q.  What  Database  Administration  problems,  if any, does Datatrieve
              introduce?
          A.  Datatrieve can't have full write access to the database, but can still
              cause  problems  in an environment that hasn't been thought out with
              reasonable  care.    It's much safer than DBQ.  (A brief discussion
              seemed  to  arrive  at the consensus that as an inquiry and report-
              writing  tool Datatrieve should cause minimal problems in user hands,
              and  beyond that one would be asking for trouble no matter what... a
              DBMS expects modification through the integral channels etc.)
          Q.  How  does  one  introduce  the DBMS stuff into the Datatrieve data
              dictionary?
          A.  (Longer  discussion.  The DBMS-Datatrieve interface trades heavily on
              the Datatrieve concept of "view", a kind of second cousin of the DBMS
              "subschema"  and not documented until V2.0.  Because the two products
              do not have a common data dictionary there are entries required in the
              Datatrieve data dictionary which effectively duplicate entries in the
              DBMS  schema,  and  V2.0 contains syntax to support this.  The V2.0
              documentation will presumeably make all clear...)
          Q.  Is there new syntax for DBMS-11 to support query names?
          A.  Yes...QUERY NAME,     EDIT-STRING, and QUERY HEADER.
          Q.  How about DBMS-11 and Datatrieve performance?
          A.  If you think of Datatrieve as being a well-optimized COBOL job running
              against the database, you won't be far wrong.
          Q.  How complex a Datatrieve collection can you have with DBMS-11?
          A.  This  question  is another that is difficult to address in absolute
              terms  but note that DBMS uses its own buffers so some saving of user
              program space is possible.




                                                                                 9
          Q.  Can you have an RMS and DBMS view simultaneously?
          A.  "Yes, and it performs like a dog." (Further elucidation prescribed the
              problem  to  the co-tree structure --- the amount of system software
              involved in such a session boggles the contemplative midn.)
          Q.  Is  it possible to mess up the database with Datatrieve during field
              modification, for example by modifying the critical field in a sorted
              set?
          A.  Yes.
          Q.  Can you delete rcords from a database using Datatrieve?
          A.  No. ERASE (and STORE) are not allowed because Datatrieve has no way of
              doing the required disconnects (and connects).
          Q.  When does Datatrieve do the BIND?
          A.  Datatrieve binds on record definition.
          Q.  Does Datatrieve handle all legal DBMS record types?
          A.  Yes.
          Q.  Do you issue READY and FINISH statements from Datatrieve?
          A.  Yes.
          Q.  In  DBMS-11, logically-delected records aren't really deleted until a
              subsequent  walk-through.  Does Datatrieve access count as that walk-
              through?
          A.  If  you walk a set with Datatrieve, any logically-deleted records go
              away as expected.
          Q.  Will DBMS-11 and Datatrieve get a common data dictionary?
          A.  With DBMS-11, no.  On the VAX, yes.
          Q.  Can Datatrieve affect lockout procedures?
          A.  Definitely.    A  Datatrieve user is subject to all the READY-mode
              protections  and locks in the system, and so could be a considerable
              distrubance to an in-place DBMS application system.  But remember that
              DBMS-11  V1.8 supports multiple independent databases, so it will be
              much easier to avoid collisions.
          Q.  Are multiple-record-type sets supported by Datatrieve?
          A.  No.    Datatrieve  will require you to look at these in two or more
              passes.

        I  hope the preceeding has conveyed the spirit and some of the substance of
        the DBMS-Datatrieve session.  It would seem we are at that part of the story
        where Ms. S. Beauty says "At last, my prince has come." and the next chapter
        should  indicate  whether they live happily ever after or behave like the
        national norm.  As DBMS/Datatrieve users, we are looking forward to V1.8 and
        V2.0  with  a good deal of enthusiasm and so are the other DBMS users who
        attended  the session.  Given all these eager users straining to get at the
        products  and  the  broadened horizons each product offers in the pending
        release,  the  next  several  DECUS  gatherings should be particularly
        interesting for users of DEC data management software.


        THE ABOVE NOTES WERE TAKEN BY:

          WAYNE D. INGRAM
          BRITISH COLUMBIA RAILWAY
          1095 WEST PENDER STREET
          VANCOUVER, B.C. V6E 2N6




                                                                                10
        The following is a summary of the DATATRIEVE V2 PREVIEW session given by Jim
        Starkey at the December DECUS in San Diego.

        DATATRIEVE version 2 will supports 3 types of hierarchical structures.

          1  - The COBOL "OCCURS" clause structure of a fixed length sublist.  You
        can now repeat a field (an elementary or group item) a fixed number of times
        within each record.
          2 - The COBOL "OCCURS DEPENDING ON" clause where the number of occurances
        of  the repeating group can vary from record to record - a variable length
        list.
          3  - The hierarchical view - This structure is defined as a domain across
        multiple files which interrelate in a hierarchical manner.  The view can be
        of  just  one  domain to allow the user to view some, but not all, of the
        fields of the domain.  OR it can be a view of two or more domains where the
        subordinate  files  are linked to the primary file based on the value of a
        field that is common between the two.

        For  example:  refer back to the record definitions of YACHTS and OWNERS.
        From these domains can be formed the VIEW SAILBOATS.



                                      LENGTH
                                       OVER
        MANUFACTURER  MODEL    RIG     ALL     WEIGHT  BEAM    PRICE

          ALBIN      79        SLOOP   26       4,200  10      $17,900
          ALBIN      BALLAD    SLOOP   30       7,276  10      $27,500
          ALBIN      VEGA      SLOOP   27       5,070  08      $18,600
          ISLANDER   28        SLOOP   28       5,994  10      $15,908
          ISLANDER   30        SLOOP   30       8,600  10      $20,990
          ISLANDER   36        SLOOP   36      13,450  11      $31,730
          ISLANDER   BAHAMA    SLOOP   24       4,200  08       $6,500
          ISLANDER   FREEPORT  KETCH   41      22,000  13      $54,970

        DTR> PRINT OWNERS

        OWNER
        NAME         BOAT NAME         BUILDER         MODEL




                                                                                11
        SHERM        MILLENNIUM FALCON ALBERG          35
        STEVE        DELIVERANCE       ALBIN           VEGA
        JIM          POTEMKIN          ILSANDER        BAHAMA
        ANN          POTEMKIN          ISLANDER        BAHAMA
        STEVE        POTEMKIN          ISLANDER        BAHAMA
        DICK         PURSUIT           PEARSON         26

        DTR> PRINT SAILBOATS WITH BUILDER="ISLANDER","ALBIN"



                                      LENGTH
                                       OVER                            OWNER
        MANUFACTURER MODEL     RIG     ALL     WEIGHT  BEAM    PRICE   NAME

          ALBIN      79        SLOOP   26       4,200  10      $17,900
          ALBIN      BALLAD    SLOOP   30       7,276  10      $27,500
          ALBIN      VEGA      SLOOP   27       5,070  08      $18,600 STEVE
          ISLANDER   28        SLOOP   28       5,994  10      $15,908
          ISLANDER   30        SLOOP   30       8,600  10      $20,990
          ISLANDER   36        SLOOP   36      13,450  11      $31,730
          ISLANDER   BAHAMA    SLOOP   24       4,200  08       $6,500 JIM
                                                                       ANN
                                                                       STEVE
          ISLANDER   FREEPORT  KETCH   41      22,000  13      $54,970

        Along with these three hierarchical structures comes two supported extensions
        to the DATATRIEVE language.

          1 - to print a sublist or a subset of a print-list you will use the form: ALL
        print-list OF RSE

        DTR> FIND SAILBOATS
        [117 records found]
        DTR> PRINT BUILDER, RIG, ALL NAME OF SKIPPERS OF SAILBOATS WITH
        BUILDER="ISLANDER"


                               OWNER
        MANUFACTURER  RIG      NAME

        ISLANDER     SLOOP
        ISLANDER     SLOOP
        ISLANDER     SLOOP
        ISLANDER     SLOOP     JIM
                               ANN
                               STEVE
        ISLANDER     KETCH

        DTR> FIND SAILBOATS WITH BUILDER="ISLANDER","ALBIN"
        [8 records found]
        DTR> PRINT BOAT, ALL NAME OF SKIPPERS OF CURRENT





                                                                                 12
                                      LENGTH
                                       OVER                            OWNER
        MANUFACTURER  MODEL    RIG     ALL     WEIGHT  BEAM    PRICE   NAME

          ALBIN       79       SLOOP   26       4,200  10      $17,900
          ALBIN       BALLAD   SLOOP   30       7,276  10      $27,500
          ALBIN       VEGA     SLOOP   27       5,070  08      $18,600
          ISLANDER    28       SLOOP   28       5,994  10      $15,908
          ISLANDER    30       SLOOP   30       8,600  10      $20,990
          ISLANDER    36       SLOOP   36      13,450  11      $31,730
          ISLANDER    BAHAMA   SLOOP   24       4,200  08       $6,500 JIM
                                                                       ANN
                                                                       STEVE
          ISLANDER    FREEPORT KETCH   41      22,000  13      $54,970

          2 - To search a sublist - to find if there exists a record in the domain that
        has at least one element in its sublist that satisfies the RSE.

        DTR> PRINT SAILBOATS WITH ANY SKIPPERS WITH NAME="STEVE"


                                      LENGTH
                                       OVER                            OWNER
        MANUFACTURER  MODEL    RIG     ALL     WEIGHT  BEAM    PRICE   NAME

          ALBIN       VEGA     SLOOP   27       5,070  08      $18,600 STEVE
          ISLANDER    BAHAMA   SLOOP   24       4,200  08       $6,500 JIM
                                                                       ANN
                                                                       STEVE


        DTR> PRINT MODEL,RIG,PRICE,ALL NAME OF SKIPPERS OF SAILBOATS WITH
        [looking for Boolean expression]
        DTR> ANY SKIPPERS WITH NAME="STEVE"


                                       OWNER
          MODEL       RIG      PRICE   NAME

        VEGA          SLOOP    $18,600 STEVE
        BAHAMA        SLOOP     $6,500 JIM
                                       ANN
                                       STEVE

        VALIDATION - DATATRIEVE now supplies you with two forms of automatic validation
        - one is an internal DATATRIEVE feature, the other, a user defined test.
          1 - DATATRIEVE will now reprompt if the data entered to store or modify
        produces an input error - conversion error, overflow, truncation, or validation
        error.  You will not be allowed to continue on to the next field until
        acceptable data is entered. (TAB still works)
          2 - By placing a VALID IF <Boolean> in a field definition, the data will be
        tested against the boolean and stored only if the test succeeds, otherwise you
        will be reprompted and alerted by a "BEEP".

        DATE data type - This new feature is specified by USAGE IS DATE in a field
        definition.  The date is stored as a 64 bit binary value.  The date can be
        converted to one of a multitude of different formats using an edit-string.  For
        example :
        DTR> PRINT "TODAY" USING DD-MMM-YY




                                                                                13
        14-Jan-80

        DTR> PRINT "TODAY" USING DD-MMM-YYYYBWWW
        14-Jan-1980 Mon

        Variables - DATATRIEVE version 2 supports global (command level) and local
          (within a begin-end block) variables.  They are defined as if they are
          elementary fields using a DECLARE variable-name then a PCI or USAGE IS DATE
          clause.

        COMPUTED BY - This useful feature specifies a field as a virtual field, taking
          up no space in a record.  The value is computed each time the field is
          referenced.

        Application Design Tool - ADT helps you define domains, records, and files by
          carrying on a question and answer dialogue with you and then building a
          command file containing the definitions.  It is very simply to follow -
          completely self-explanatory with either simple of detailed questions.  Great
          help for the beginner datatriever.

        Tables - This new feature allows you to store the decoded counterpart of coded
          data that may exist in a field of a domain.  You can now have a field contain
          a value such as department-number but have the cooresponding department-name
          print out on a report instead by using the form:  PRINT field-name VIA table-
          name.

        EXTRACT command - with this feature, you can instruct DATATRIEVE to put a
          record, domain, procedure or table definition to an external file while
          leaving the dictionary unchanged.

        Concatenation characters - In version 2, a new concatenation character has been
          added.  Using "II" will leave zero blanks between the two expressions.

        TOTAL statement - This new statement produces a completely formatted summary
          report of the specified numeric fields in the current collection without
          requiring you to use the report writer yourself.

        DEFINE DICTIONARY - You can now instruct DATATRIEVE to create an rms file to be
          used as a private dictionary.

                              THE ABOVE NOTES WERE SUBMITTED BY:

                                       BETH CARTER
                                       BRIDGEPORT-TEXTRON CONTROLS
                                       200 PRECISION ROAD
                                       HORSHAM, PA 19044




                                                                                 14
        The following is the Datatrieve Wish List that was compiled in San Diego with
        some responses in the closing DTR SIG meeting on 13-Dec-79.

        There  is  no  special order to this list; it is in the order that it was
        presented.

        One  goal  for the next issue of the Wombat Examiner and the Chicago DECUS
        meeting  is to create some priority for this list.  If you feel that any of
        these items should be delt with in some order or you have any other wish list
        items for Datatrieve please send them along as soon as possible to:

                         Bob McCormick - DTR Wish List Editor
                         Farm Credit Banks of Springfield
                         P.O. Box 141
                         Springfield,
                         Massachusetts   01101

        QO]      COMPUTED BY clause in a VIEW.
        AO]      This is reasonable.  We'll look into this.

        Q1]      Report Writter - Do NOT sort keys for "AT BOTTOM" fields.
        A1]      This is done in Version 2.0

        Q2]      The Statement:
                      :TASK
                            FIND xxx; PRINT xxx; MODIFY xxx; IF *.ANS NE "Y" ABORT
                            ELSE :TASK

        A3]      Forget it!

        Q4]      Hierarchial Data Structures.
        A4]      This is in V2.0

        Q5]      Shared copy of DTR among several users.
        A5]      No.    Datatrieve would not fit in an 11/34.  And if it could you
                 would have a dozen user break even point.

        Q6]      Fortran subroutines called via DTR.
        A6]      This is not feasible.

        Q7]      COBOL subroutines called via DTR.
        A7]      This is also not feasible.

        Q8]      The ability to sequentially number records in Report Writter.
        A8]      The way to do this would be the keyword RUNNING.  There is a remote
                 posibility  that we could implement this in V2.0.  We will look at
                 it.

        Q9]      DTR "Compiler" for commonly used procedures.
        A9]      DTR is so fast it doesn't make any difference!

        Q10]     Ability to disable ADT.
        A10]     This  could  be  done with QD.MAC switches.  We will also look at
                 disable switches for DEFINE DICTIONARY and maybe SET DICTIONARY.




                                                                                15
        Q11]     No ECHO switch for speeding up command files.
        A11]     Use procedures rather than command files.

        Q12]     Sources!
        A12]     (pause) Jim then explained the pros and cons of obtaining the source
                 to DTR.  It would be very expensive and you would loose support!

        Q13]     Average of integer fields prints out as real unmbers.
        A13]     Will be fixed in V2.0

        Q14]     Count with values greater than 9999.
        A14]     Use edit string on the count field.

        Q15]     RSE usage on print in report writter.
        A15]     Inner print list only.

        Q16]     Multiple counts and average in one pass through file.
        A16]     No.  Too hairy.  DTR is not set up to handle that.

        Q17]     Do "SHOWS" to a file.
        A17]     Use  the OPEN command and SHOW xxx for shows to a file.  V2.0 will
                 have  an EXTRACT command to generate a command file ready copy of a
                 dictionary element.

        Q18]     Additional statistic functions.
        A18]     Talk to your local DEC Salesman about LDP products.

        Q19]     Double precision integer arithmetic.
        A19]     We  already  have double precision.  You must mean Quad-precision.
                 This would be big enough to handle the national debt in mili-Lira.

        Q20]     Symbols for the current system date and time.
        A20]     Time support will not be in Version 2.0.  Date support will.

        Q21]     Standard  file  extensions for command files for domain and record
                 definitions.
        A21]     These are `.CMD'.

        Q22]     Minimal plotting features eg histograms.
        A22]     No, not in this version.

        Q23]     Allow  append  to file on a PRINT instead of new file for each and
                 every PRINT command.
        A23]     No.

        Q24]     Default vallues in record definitions.
        A24]     Probably usefull.  If we get some time.




                                                                                16
        Q25]     Ability  of IAS users to terminate comands without having to abort
                 DTR.
        A25]     IAS does not give any CTRL-C AST's.  DTR will when IAS does.

        Q26]     Ability to merge collections into new collection.
        A26]     Not going to be in Version 2.0.  Probably won't be seen in DTR-11.

        Q27]     Implement MATCH functions.
        A27]     Space considerations.  Certainly will be an undocumented feature if
                 implemented.

        Q28]     Ability  to EXIT from DTR and `chain' to another program (parameter
                 in QD.MAC)
        A28]     Interesting idea!

        Q29]     FMS-11 support.
        A29]     No support in V2.0.  I can't tell you when.

        Q30]     Subscripted fields (occurs).
        A30]     Optional for V2.0.  Didn't get around to doing it.
                 Post 2.0 implementation.

        Q31]     3 Day DTR course.
        A31]     Lobbying at DEC.  Best lobbyists are our DEC customers! (laughter)

        Q32]     DTR SPI, CAI, CMI (Primer) type course.
        A32]     (Conversation  reveals  all  users are interested in some type of
                 courses for DTR).

        Q33]     Character string operators such as substring and position
        A33]     Not until we get some other space problems solved.

        Q34]     Beginners Guide to DTR.
        Q34]     This will be a reality in Version 2.0.

        Q35]     E format (scientific notation).
        A35]     Not easy.  Nice but no space in DTR-11.

        Q36]     Scrolling of large fields and or records when printing.
        A36]     Redifine  record  into  a  bunch of small fields.  Maybe RUNOFF
                 justification commands.

        Q37]     Command to dump entire dictionary to file or device eg EXTRACT ALL.
        A37]     Fair amount of work needed on this one.  Not in V2.0.

        Q38]     Word wrap at end of line.
        A38]     T Format likely in V2.0.

        Q39]     DTR should use generic substring search in RMS keys
        A39]     It does in V2.0.  It works by magic! (laughter)




                                                                                17
        Q40]     Make primary string changeable even if DTR has to ERASE and STORE.
        A40]     Very Very difficult.

        Q41]     Documentation of DTR internals similar to RMS documentation.
        A41]     Only internals of interest are optimization.
                 May have appendix to new manual.

        Q42]     Documented  User Exit at Domain Ready for code to return a boolean
                 indicator  to  DTR  to  indicate whether the requested access is
                 allowed.  This would allow users to do their own security.
        A42]     User code would weaken in the long run instead of strengthening it.

        Q43]     Video tape DTR Course.
        A43]     Same as for other educational courses.

        Q44]     DATE datatype to allow integer adds and subtracts.
        A44]     We can do subtracts and will look at adds.

        Q45]     SET COLUMNS-PAGE = 0 for no abort when record length is too long for
                 screen.  No way to print out large records (>255) for debussing.
        A46]     No.  Redefine fields that are too long.

        Q47]     DTR Documentation a) Pocket guide and b) Optimization chapter in the
                 DTR manual.
        A47]     Who can say when?  They both sound like good ideas!

        Q49]     Collection pruning.
        A49]     Nice thing to do.  Keyword could be PURGE.  Not in V2.0.

        Q50]     Storing  using assignment and modifying occurs (fixed and variable)
                 fields.
        A50]     There is a hole in the bag.  Will look into it.

        Q51]     Equivalence retrievals on floating point values.
        A51]     Ah HA!  That's the FPP equality problem.




                                                                              18
                                JIM STARKEY'S FALL '79 DECUS
                                        WOMBAT MAGIC


            At the December DECUS, Jim Starkey held a number of sessions at which he
        sat  at a terminal demonstrating and answering questions about Datatieve and
        some of its uses and/or features.  These sessions were extremely helpful, and
        I would first like to thank Jim very much for spending so much time with us.

            The  notes  which  follow are an attempt to pull together some of the
        information  which  came out of these sessions.  They are in no particular
        order,  and unless you have used Datatrieve and encountered some of the same
        questions  or problems yourself, they may not make any sense.  In addition,
        much  of the information is specific to Version 2.0 which is still in Field
        Test so if the commands don't work and you are on 1.1 be patient and wait for
        your new release.

            In  any case, I hope at least some of these notes are useful to at least
        some of you...
         1. In  Version  2.0, BL 14, you can edit record and domain definitions as
            follows:
                 EDIT DOMAIN-NAME ADVANCED or
                 EDIT RECORD-NAME ADVANCED
            After editing the definition, you must finish and re-ready the domain to
            make  use  of  any changes you have made.  You obviously must be very
            careful  with this command as you can make your record definition and/or
            domain not match the file.
         2. There  was  a  problem  with  the ZZ.ZZ edit-string; it has now been
            corrected.   Previously, if the value stored in the field was 0.05, the
            ZZ.ZZ  edit-string would cause it to print as ". 5".  It will now print
            "0.05".   In addition, if the value in the field is 0, it will leave the
            field blank when it prints.

         3. You can say:
                 REPEAT 500 :PROCEDURE-NAME
            [Editor's note:  Repeate the first statement of the procedure n times and
            then execute the rest of the procedure if any]

         4. To  repead a statement n times, with the user specifying a value for n,
            you can say:
                 REPEAT *."HOW MANY TIMES" STORE YACHTS
                 !This  prompts the user for how many records he wants to store, and
            then repeats the store that many times.

         5. In QED, the %'s are optional in the WH, B and E commands.

         6. The  command  SET  DICTIONARY  will set the dictionary to the default
            dictionary (i.e., it is not necessary to say SET DICTIONARY DEFAULT.DIC).




                                                                                19
         7. READY is a synonym for the most recently readied domain.  Therefore, you
            can say:
                 FIND  READY (finds the records in the most recently readied domain)
            or
                 PRINT  READY  (to  print the records in the most recently readied
            domain), etc.

         8. When  you do a FIND and want to know if any records have been found you
            can say:
                 IF ANY CURRENT...

         9. There are three statements one can use for finding either all records in
            a  domain,  all records in which the value in a specified field is not
            duplicated,  or  all records in which the value in a specified field is
            duplicated.    The  commands  themselves  make more sense than this
            explanation:
                 FIND A IN YACHTS
                 ! This finds all entries in Yachts

                 FIND A IN YACHTS WITH NOT ANY YACHTS WITH BUILDER = A.BUILDER
                 BUT MODEL NE A.MODEL
                 !  This finds entries in Yachts for which the particular builder is
            only listed in the file once (no duplicate entries for builder)

                 FIND A IN YACHTS WITH ANY YACHTS WITH BUILDER = A.BUILDER AND
                 MODEL NE A.MODEL
                 ! This finds entries in Yachts for all those builders who have more
                 than  one  model number listed in the file (duplicate entries for
            builder)

        10. Use  of  the  FIND command gives a performance penalty of about 60% in
            comparison  to the FOR command (or the REPORT DOMAIN-NAME command in the
            report writer).  Therefore use the FOR command when possible.

        11. The VALID IF expression can be used to check whether a vallue entered for
            a field appears in a specified table.  It is used as follows:
                      . . . VALID IF FIELD-NAME IN TABLE-NAME

        12. The documentation is not clear on the printing of fields via tables.  If
            the  expression to be printed is longer than the field, you must use the
            PRINT  USING statement to expand the space allotted for the printing of
            the expression.  For example:
                      PRINT FIELD-NAME VIA TABLE-NAME USING X(20).

        13. Computed-by  fields  cannot be sorted or used in views.  The reason for
            this  is  that the value is not stored, but recomputed each time is is
            referenced.

        14. The TOTAL statement can be used to produce quick reports with tally-sheet
            type totals:
                 FIND YACHTS WITH LOA > 29




                                                                                20
                 TOTAL 1 BY LOA, RIG
                 !What this produces is essentially a table with frequency
                 distributions for the LOA's for each RIG

                 !You can also specify a field which should be totalled:
                 FIND YACHTS
                      TOTAL BY LOA, RIG
                 !This example is similar to saying "At botom of loa print
                 loa, total price"

        15. You can set a variable equal to COUNT.

        16. The default edit-string for COUNT is ZZZ9, but you can override this with
            a PRINT USING statement.

        17. DELETED

        18. Variables can be printed along with fields in a report.

        19. You can use "virtual variables".  For example,
            DECLARE PRICE-PER-POUND COMPUTED BY DISPLACEMENT/PRICE
            PRINT ALL BOATS, PRICE-PER-POUND

        20. currently,  averages of integer fields are computed as integers so that
            the average of 3 or 4 turns out to be 3.

        21. Suppressing  headers at a group level now suppresses the headers of all
            fields within the group.

        22. Keying a group name causes the first field in that group to be treated as
            a key even if it was not defined as one on its own.

        23. You cannot key occurs fields.

        24. With USAGE DATE, the date can be entered in almost any reasonable format.
            As  always,  the edit-string controls the format used for printing.  To
            subtract  dates,  set  the date you would like to subtract equal to a
            variable  and  PRINT  "TODAY"  -  VARIABLE-NAME.  A procedure which
            demonstrates both of these features follows:
            PROCEDURE DAYS-AGO
            DECLARE FOO USAGE DATE.
            REPEAT 99 FOO=*."ANY DATE" THEN
            PRINT "TODAY"-FOO
            END-PROCEDURE

        25. If a field is defined a usage date field, it can be keyed, and the index
            for  this  key will be used for exact date retrievals.  However, range
            searching cannot be done through the index, but will be done on the file
            only as RMS doesn't support 4 word binary searching.  In other words, the
            retrieval for the command:  FIND DOMAIN WITH DATE-FIELD = "12-14-79" will
            be  done  via  the index, whereas the retrieval for the command:  FIND
            DOMAIN  WITH DATE-FIELD GT "12-00-79" AND LT "12-31-79" will be done via
            the  file.    Depending  on the types of retrievals you do, this may
            influence whether you decide to key your




                                                                                21
            date field.

        26. DELETED

        27. DELETED

        28. The  REDEFINES  clause  can b used with both fixed and variable occurs
            fields.   With a variable occurs field, the field must be redefined the
            maximum  number  of times.  That is, if a field occurs 0-5 times, there
            must be 5 REDEFINES in order to access all 5 ocurrences.  (See next item
            also.)

        29. It  is possible to store and/or modify OCCURS fields (other than simply
            saying  STORE DOMAIN-NAME and letting Datatrieve prompt you.)  Two ways
            which  were demonstrated at DECUS follow.  Both examples involve storing
            records in the Families domain.

            The first method uses a temporary domain as well as the Families domain.
            The record definitions are:
            RECORD FAMILY-REC
            01 FAMILY.
               03 PARENTS.
                  06 FATHER PIC X(10).
                  06 MOTHER PIC X(10).
               03 NUMBER-KIDS PIC 99 EDIT-STRING IS Z9
               03 KIDS OCCURS 0 TO 10 TIMES DEPENDING ON NUMBER-KIDS.
                  06 KID.
                     09 KID-NAME PIC X(10) QUERY-NAME IS KID.
                     09 AGE PIC 99 EDIT-STRING IS Z9.
            ;
            RECORD FAMILY-TEMP
            01 KID.
               03 KID-NAME PIC X(10).
               03 AGE PIC 99.
            ;
            The  procedure which gives you control of the prompting and storing into
            the OCCURS field is:
            PROCEDURE Q
            READY FAMILIES WRITE
            READY TEMP WRITE
            REPEAT *."NUMBER OF FAMILIES"
               STORE A IN FAMILIES USING
                  BEGIN
                     MOTHER=*.MOTHER
                     FATHER=*.FATHER
                     NUMBER-KIDS=*.NUMBER-KIDS
                     REPEAT A.NUMBER-KIDS
                        STORE TEMP USING BEGIN
                           KID-NAME=*.KID
                           AGE=*.AGE  END
                     KIDS=TEMP
                     ERASE ALL OF TEMP
                  END
            END-PROCEDURE




                                                                                22
            Another  approach which also gives you control over the prompting, etc.,
            is  to use the REDEFINES clause.  In this case, the record definition is
            as follows:
            RECORD FAMILY-REC
            01 FAMILY.
               03 PARENTS.
                  06 FATHER PIC X(10).
                  06 MOTHER PIC X(10).
               03 NUMBER-KIDS PIC 99 EDIT-STRING IS Z9
               03 KIDS OCCURS 0 TO 5 TIMES DEPENDING ON NUMBER-KIDS.
                  06 KID.
                     09 KID-NAME PIC X(10) QUERY-NAME IS KID.
                     09 AGE PIC 99 EDIT-STRING IS Z9.
               03 KIDS-REDEF REDEFINES KIDS.
                  06 KID-1 PIC X(10).
                  06 AGE-1 PIC 99.
                  06 KID-2 PIC X(10).
                  06 AGE-2 PIC 99.
                  06 KID-3 PIC X(10).
                  06 AGE-3 PIC 99.
                  06 KID-4 PIC X(10).
                  06 AGE-4 PIC 99.
                  06 KID-5 PIC X(10).
                  06 AGE-5 PIC 99.
            ;
            The procedure which uses this record definition is:
            DEFINE PROCEDURE P
            READY FAMILIES WRITE
            STORE A IN FAMILIES USING
               BEGIN
                  MOTHER=*.MOTHER
                  FATHER=*.FATHER
                  NUMBER-KIDS=*.NUMBER-KIDS
                  IF A.NUMBER-KIDS>0 KID-1=*.KID
                  IF A.NUMBER-KIDS>1 KID-2=*.KID
                  IF A.NUMBER-KIDS<2 KID-3=*.KID
                  IF A.NUMBER-KIDS>3 KID-4=*.KID
                  IF A.NUMBER-KIDS<4 KID-5=*.KID
               END
            END-PROCEDURE
            (Note that the number of kids was cut down in this example to save typing
            time only.)

            The  first method, procedure Q, is recommended over the second, but both
            work and have ideas you might also take advantage of elsewhere.

        30. There are sometimes cases where it is necessary to number the items in a
            list, here is one way to do it (it also does a few other cute things).
            PROCEDURE P
            READY YACHTS
            FIND YACHTS
            BEGIN




                                                                                23
               DECLARE NUMBER PIC 999 EDIT-STRING IS ZZZ.
               NUMBER=1
               DECLARE BREAK PIC X(20).
               DECLARE TOTAL-PRICE PIC 9(8) EDIT-STRING IS $$.$$$,$$$.
               TOTAL-PRICE=0
               FOR CURRENT
                  BEGIN
                     PRINT NUMBER, BOAT
                     NUMBER=NUMBER+1
                     TOTAL-PRICE = TOTAL-PRICE + PRICE
                     IF BREAK NE LOA PRINT COL 70, TOTAL-PRICE THEN TOTAL-PRICE=0
                     BREAK=LOA
                  END
            END
            END-PROCEDURE

        31. As  an example of the use of inner print loops you might want to try the
            following:
            READY FAMILIES
            PRINT ALL PARENTS, ALL KIDS SORTED BY AGE OF
            FAMILIES SORTED BY MOTHER, FATHER
            also
            READY FAMILIES
            FIND FAMILIES
            REPORT
            PRINT SKIP, PARENTS, AVERAGE AGE OF KIDS, ALL KID-NAME OF KIDS
            END-REPORT




                                                                                24
            DECUS UK

                                                        Please reply to:

        The Editor,                                     Mr. R.S.M. Bowden,
        DATATRIEVE Newsletter,
        C/O DECUS,
        One Iron Way,
        MR2-3/E55,
        MARLBORO'
        MA  17562,
        U.S.A.


        Dear Sir,

        Please find enclosed a front cover for your consideration.  It was drawn by
        one of our Senior Programmers, Mrs. Carla Marshall.  We use datatrieve in a
        number of areas and are planning further projects.

        (a)  Library  Index.   This is a straight forward catalogue of technical
        reports with details of source titles, borrowers etc. and uses the multiple
        file technique described in your last issue.

        (b)  Revenue  Control.   This utilizes the arithmetic features to compile
        statistics of expenditure under the various cost control numbers.

        (c)  Maintenance  History.  A system to maintain a history of major power
        station plant is being considered.

        (d)  Program Library.  An index of all the programs in the DECUS UK library
        is  being maintained.  This will enable a sorted catalogue of programs with
        details  of executive and language.  A selective search may also be carried
        out.

        The  existing  applications are under the control of the indirect command
        processor so that they may be used by our administration staff.

        A  number  of  problems have been encountered which have not as yet been
        overcome.

        (a)  To  reduce a domain containing duplicate records extracted from other
        files to a domain in which each record is unique.

        (b) When an indirect command file is run and the resultant report displayed
        on  the  issuing terminal, the commands will appear on the screen with the
        different parts of the reports.  A facility to direct all but the comments,
        requests for data tnd the output print to the null device would be extremely
        useful.

        Comments and advice of these would be most welcome.

        Yours faithfully,

        R.S.M. BOWDEN

          DIGITAL EQUIPMENT COMPUTER USERS SOCIETY
          2 CHEAPSIDE, READING, RG1 7AA
          TELEPHONE READING (0734)583555 EXT.3229  TELEX 848327




                                                                                25
        FROM : GORDON BOOMAN
               ASARCO
               CENTRAL RESEARCH DEPARTMENT
               901 OAK TREE ROAD
               SOUTH PLAINFIELD, N.J.  07080

        HERE'S  A  SOLUTION TO THE PROBLEM POSED BY DAVE NORDBY AND JOAN HILTON IN
        VOLUME 1 OF THE WOMBAT EXAMINER.  THEY ATTEMPTED TO FORM A COLLECTION BASED
        ON  ANOTHER  COLLECTION,  BOTH  OF  WICH WERE IN THE SAME DOMAIN.  THEY
        ILLUSTRATED THE PROBLEM IN EXAMPLE *3.

        I'D  LIKE  TO  THANK  DAVE, JOAN, AND CHUCK WATSON FOR THE INSIGHTS THEY
        PROVIDED  IN  THE FIRST ISSUE OF THE WOMBAT, AND ESPECIALLY CHUCK FOR THE
        INSIGHTS INTO THE SECRET LIFE OF THE WOMBAT.

         DTR> READY YACHTS
        DTR> FOR A IN YACHTS WITH RIG="KETCH"
        [Looking for statement]
        DTR> FOR YACHTS WITH BUILDER=A.BUILDER AND RIG="SLOOP" PRINT

                                       LENGTH
                                        OVER
        MANUFACTURER   MODEL     RIG    ALL   WEIGHT BEAM  PRICE

         CHALLENGER  32         SLOOP   32    12,800  11  $31,835
         CHALLENGER  35         SLOOP   35    14,800  12  $39,215
         GRAMPIAN    2-34       SLOOP   34    11,800  10  $29,675
         GRAMPIAN    26         SLOOP   26     5,600  08  $11,495
         GRAMPIAN    28         SLOOP   28     6,900  10  $14,475
         GRAMPIAN    30         SLOOP   30     8,600  09  $17,775
         IRWIN       25         SLOOP   25     5,400  12  $10,950
         IRWIN       30         SLOOP   30    10,000  10  $19,950
         IRWIN       HALF TON   SLOOP   30     7,300  10
         ISLANDER    28         SLOOP   28     5,994  10  $15,908
         ISLANDER    30         SLOOP   30     8,600  10  $20,990
         ISLANDER    36         SLOOP   36    13,450  11  $31,730
         ISLANDER    BAHAMA     SLOOP   24     4,200  08   $6,500
         NORTHERN    29         SLOOP   29     7,250  09  $20,975
         PEARSON     10M        SLOOP   33    12,441  11
         PEARSON     26         SLOOP   26     5,400  08
         PEARSON     26W        SLOOP   26     5,200  09
         PEARSON     28         SLOOP   28     7,850  09
         PEARSON     30         SLOOP   30     8,320  09
         PEARSON     35         SLOOP   35    13,000  10
         PEARSON     36         SLOOP   37    13,500  11
         PEARSON     39         SLOOP   39    17,000  12
         PEARSON     10M        SLOOP   33    12,441  11
         PEARSON     26         SLOOP   26     5,400  08
         PEARSON     26W        SLOOP   26     5,200  09
         PEARSON     28         SLOOP   28     7,850  09
         PEARSON     30         SLOOP   30     8,320  09
         PEARSON     35         SLOOP   35    13,000  10
         PEARSON     36         SLOOP   37    13,500  11
         PEARSON     39         SLOOP   39    17,000  12


                                                                                26
        DTR> !Note that this is incorrect...sloops from Pearson are repeated
        DTR> !twice...Why? well,
        DTR> PRINT ALL YACHTS WITH RIG = "KETCH"

        MANUFACTURER   MODEL     RIG    LOA   WEIGHT BEAM  PRICE

         ALBERG      37 MK II   KETCH   37    20,000  12  $36,951
         CHALLENGER  41         KETCH   41    26,700  13  $51,228
         FISHER      30         KETCH   30    14,500  09
         FISHER      37         KETCH   37    30,000  12
         GRAMPIAN    34         KETCH   33    12,000  10  $29,675
         GULFSTAR    41         KETCH   41    22,000  12  $41,350
         I. TRADER   37         KETCH   36    18,600  12  $39,500
         IRWIN       37 MARK II KETCH   37    20,000  11  $36,950
         ISLANDER    FREEPORT   KETCH   41    22,000  13  $54,970
         NORTHERN    37         KETCH   37    14,000  11  $50,000
         OLYMPIC     ADVENTURE  KETCH   42    24,250  13  $80,500
         PEARSON     365        KETCH   36    17,700  11
         PEARSON     419        KETCH   42    21,000  13

        DTR> ! There are two Pearson ketches.  We prit out Pearson sloops any
        DTR> ! time we find a Pearson ketch.  Oh well,
        DTR> FIND SLOOPS IN YACHTS WITH RIG = "SLOOP"
        [95 records found]
        DTR> FIND KETCHES IN YACHTS WITH RIG = "KETCH"
        [13 records found]
        DTR> FIND SAME_BUILDER IN SLOOP WITH
        [Looking for Boolean expression]
        DTR> ANY KETCHES WITH BUILDER = SAME-BUILDER.BUILDER
        [22 records found]
        DTR> PRINT ALL

        MANUFACTURER   MODEL     RIG    LOA   WEIGHT BEAM  PRICE

         CHALLENGER  32         SLOOP   32    12,800  11  $31,835
         CHALLENGER  35         SLOOP   35    14,800  12  $39,215
         GRAMPIAN    2-34       SLOOP   34    11,800  10  $29,675
         GRAMPIAN    26         SLOOP   26     5,600  08  $11,495
         GRAMPIAN    28         SLOOP   28     6,900  10  $14,475
         GRAMPIAN    30         SLOOP   30     8,600  09  $17,775
         IRWIN       25         SLOOP   25     5,400  12  $10,950
         IRWIN       30         SLOOP   30    10,000  10  $19,950
         IRWIN       HALF TON   SLOOP   30     7,300  10
         ISLANDER    28         SLOOP   28     5,994  10  $15,908
         ISLANDER    30         SLOOP   30     8,600  10  $20,990
         ISLANDER    36         SLOOP   36    13,450  11  $31,730
         ISLANDER    BAHAMA     SLOOP   24     4,200  08   $6,500
         NORTHERN    29         SLOOP   29     7,250  09  $20,975
         PEARSON     10M        SLOOP   33    12,441  11
         PEARSON     26         SLOOP   26     5,400  08
         PEARSON     26W        SLOOP   26     5,200  09
         PEARSON     28         SLOOP   28     7,850  09
         PEARSON     30         SLOOP   30     8,320  09
         PEARSON     35         SLOOP   35    13,000  10
         PEARSON     36         SLOOP   37    13,500  11
         PEARSON     39         SLOOP   39    17,000  12

        DTR> ! Note that now we don't have the repeat.
        DTR> ! The intermediate FIND SLOOPS step unfortunately seems to be
        DTR> ! necessary...but at least we've got the collection.



                                                                                27
         FROM:   John Guidi
                The Computing Center
                The Jackson Laboratory
                Bar Harbor, Maine 04609
                (207) 288-3371

                One  can  take  advantage of the containing clause to do a fairly crude
        emulation  of  variable length fields.  The key to using the technique which is
        illustrated  here  is  that all these field entries begin and end with standard
        delimiters.    I  have  chosen the characters "/ " to be at the variable length
        field.
                A  domain (TRAVELS) is created which contains information regarding the
        type  of  boat,  it's  owner,  and  the ports on which this particular boat has
        called.  Obviously, some of us have the opportunity to travel more than others,
        so  the  field  port  will  have  a variable number of entries depending on how
        extensively  that  individual  boat  is  used.    In  this  example,  PORT is a
        "variable-length" field.

        1)  The domain and record definitions were defined as:

         DEFINE DOMAIN TRAVEL USING TRAVEL ON TRAVEL.DAT;

         DEFINE RECORD TRAVEL USING
         01 TRAVEL-REC.
                02 BUILDER      PIC X(10).
                02 MODEL        PIC X(10).
                02 OWNER        PIC X(10).
                02 PORT         PIC X(10).
         ;

        2)  The TRAVEL domain is then populated as follows.  Note how the delimiters
                "/ " and " /" are used to indicate a single entry in the field port:

          BUILDER       MODEL        OWNER                      PORT

        RYDER           S. CROSS     JOHN       / SAN DIEGO / AUCKLAND / HONG KONG /
                                                CAPE TOWN / BAR HARBOR /
        ISLANDER        FREEPORT     ALLISON    / BAR HARBOR / BOSTON / NORTHEAST /
        CAPE DORY       TYPHOON      CAROLYN    / BOSTON / NORTHEAST HARBOR /
        BOMBAY          CLIPPER      LOU        / SAN DIEGO / SAN FRAN / NEW ORLEANS
        WINDPOWER       IMPULSE      MIKE       / SAN DIEGO / SAN JUAN / BOSTON /

        3)    Now  by  using  the containing clause and the standard delimiters one can
        extract   records   from   the   "variable-length"  field  PORT  using  boolean
        expressions.    For example, if one wanted to know who has been to Boston or to
        New Orleans:

         DTR> FIND TRAVELS WITH PORT CONTAINING "/ BOSTON /" OR PORT CONTAINING
        "/ NEW ORLEANS /"
        [4 RECORDS FOUND]
        DTR> PRINT ALL


          BUILDER       MODEL        OWNER                      PORT

        ISLANDER        FREEPORT     ALLISON    / BAR HARBOR / BOSTON / NORTHEAST /
        CAPE DORY       TYPHOON      CAROLYN    / BOSTON / NORTHEAST HARBOR /
        BOMBAY          CLIPPER      LOU        / SAN DIEGO / SAN FRAN / NEW ORLEANS
        WINDPOWER       IMPULSE      MIKE       / SAN DIEGO / SAN JUAN / BOSTON /

        $
        $
        $


                                              28
                                          version 1.1
        Following are notes extracted from an internal newsletter edited by Joan Hilton
        and Linda Elia of Searle:

        1.  PRINT ON *.LOCATION

            It  is  possible to prompt for print location in DATATRIEVE procedures.
            Possible  print  locations include LP:, TI:, TTn:, or FILE.EXT.  If you
            write  to  a system file (FILE.EXT), it is possible to spool whtat file
            when desired using PIP FILE.EXT/SP.

            It  would  be  nice  to be able to show a domain, record or procedure
            definition  on a specified device (TTn:, etc.) as well, but this doesn't
            work (at least, not under Version 1.1).

        2.  BUCKETSIZE

            When  assigning bucketsize for RMS files used by DATATRIEVE, one usually
            tries to optimize space usage by wasting as little disk space as possible
            while  not being too greedy about the amount of buffer space in core you
            need.   It turns out, especially with the new operating system (RSX-11M,
            Version 3.2) and the new DATATRIEVE, that core is at a premium and we can
            better afford to waste some disk space than be overly generous with core.

            To  help  free up core space, it is strongly recommended that you use a
            bucketsize of 1 (which is the default) when defining files.

        3.  PROVIDING ALTERNATE DESCRIPTIONS OF THE SAME DATA

            It  is necessary to look at the same piece of data in more than one way,
            there are two ways to approach the problem in DATATRIEVE.

            One  way  is to use the REDEFINES statement in your record definition.
            Using this, it is possible to have a field called, for example, DATE and
            another field which redefines DATE as DAY, MONTH, and YEAR.  You can then
            refer to the same element of data as a unit (DATE), or refer only to the
            desired portion (or subunit) of that data element (DAY, MONTH, or YEAR).

            If  this  is not adequate for your application, you can set up multiple
            record  definitions  and domains to access the same data file.  This is
            similar  to using different BASIC PLUS-2 MAP statemens on the same data
            file.    It  gives  you greater flexibility as to how you divide and
            subdivide  the  data,  but has the added complication that you are now
            working  with  more than one domain.  If you are using an indexed file
            though,  be careful not to rearrange the keyed fields as the entire data
            file is sorted and indexed by the fields which are keyed.

        4.  "EXECUTION FAILED"

            In  our  case this error message was caused by exceeding the arithmetic
            limitation  on  multiplication and division operations within DTR.  See
            Version  1.1  Release  Notes,  page 14, 4.4.  Although DTR arthmetic
            operations are generally capable of handling up to 18 decimal digits, the




                                                                                29
            multiplication  and division operations (including Total) are limited to
            operands and results of no more than 9 decimal digits.  Therefore if you
            have  the  need to use any or all of these operations and exceed the 9
            digit limit, you will receive this error message.

            If  this  occurs,  one way to get around the problem is to define you
            numeric fields as "Comp-1" or "Comp-2" (floating-point numbers) using the
            "Usage  is"  clause (see the DTR User's Guide, Table E-2).  After doing
            this  you  must convert your data from one file into another using the
            following commands:

                  DTR> Ready Domain 1 (old)
                  DTR> Ready Domain 2 Write (new)
                  DTR> For Domain 1 Store Domain 2 using (Group name) = (Group name)

        5.  "SORT WORK SPACE EXHAUSTED"

            If  you  are involved in a long search, or have been Datatrieving for a
            while, you may receive this error message.  It will occur after you have
            issued a sort command.

                  DTR> Find (domain) with (field-name) = (value)
                  DTR> Sort work space exhausted

            One method that seems to work is to "Finish" any domains which have been
            previously readied, re-ready the domains, and re-execute your search.

                  DTR> Sort work space exhausted
                  DTR< Finish (domain)
                  DTR> Ready (domain)
                  DTR> Find . . .

        6.  Another  problem  we are having centers around the way DTR stores real
            (floating-point) numbers.  When fields are defined as Comp-1, DTR may or
            may  not store the value as you entered it.  For example, a value of .12
            is stored by DTR as a value of .119999999 . . .  Therefore when you issue
            a search for the exact value of .12, no records will be found.  Instead,
            you  must search for a value >.119 and <.12.  In this way, DTR will find
            those  records which fall into this "range".  This is a problem, but at
            this time we have no alternative.




                                                                                30
        9.  "EXPECTED READY MODE, ENCOUNTERED '('"

            A  re-READY  command (a READY for a domain previously readied) will not
            accept a password.  The following error message will occur:
                  DTR> Expected ready mode, encountered "("
                  [Syntax error -- flushing input]
            You  must  first  FINISH the domain, then READY it.  This only affects
            domains  which  have  been  set  up with password protection within
            Datatrieve.

        10. READYING DOMAINS FOR UPDATE

            The  DTR Release Notes state:  "There is a significant overhead incurred
            in  storage  and processing when a file is opened for update (MODIFY or
            WRITE).    It  is good strategy to open a file for READ, do any FIND's
            necessary, and then if necessary, change the READY mode to update."


        Datatrieve Think Response = DTR


        Here's one to see if you are really up on DTR!

            Write a Datatrieve procedure to multiply three numbers and add to it the
            sum  of  two  more  numbers.  The output should be formatted and the
            procedure should allow user input of the numbers.

        The  best  response will be published in the next newsletter along with the
        response I was looking for.  Send your answer to the address below.

        If you have found any interesting DTR features and would like to quiz the DTR
        SIG please send along your question or problem and include the answer to:

                  Bob McCormick
                  Farm Credit Banks of Springfield
                  P.O. Box 141
                  Springfield,
                  Massachusetts  01101




                                                                            31
        FROM: ROBERT F. THOMAS
              A. S. THOMAS INC.
              355 PROVIDENCE HIGHWAY
              WESTWOOD, MA  02090

        WE  HAVE  BEEN  USING DATATRIEVE SINCE IT FIRST BECAME AVAILABLE ON
        RSX-11M.  THE PRODUCT HAS BEEN OF CONSIDERABLE VALUE IN SEVERAL WAYS:

              1.  THE  ABILITY  TO EASILY DEFINE FILES AND POPULATE THEM HAS
                  BEEN A SIGNIFICANT AID IN SYSTEMS DEVELOPMENT.

              2.  THE REPORT WRITER HAS ALLOWED US TO TRAIN USERS TO GENERATE
                  THEIR  OWN REPORTS, THUS FREEING DEVELOPMENT PERSONNEL FROM
                  THE  TASK  OF  CREATING/MAINTAINING  REPORTS ON EXISTING
                  SYSTEMS.
        AS  IS TO BE EXPECTED IN ANY NEW SIGNIFICANT SOFTWARE PRODUCT, SEVERAL BUGS
        HAVE TURNED UP.  ENCLOSED ARE THREE PATCHES WHICH WE HAVE BEEN USING FOR FROM
        FOUR  TO TEN MONTHS.  NONE OF THE PATCHES HAVE BEEN PRINTED IN THE SOFTWARE
        DISPATCH FOR RSX-11M <AS OF 10/79>.

        THE ONLY MAJOR COMPLAINT THAT WE HAVE WITH DATATRIEVE IS THAT IT SUFFERS FROM
        THE  SAME TERRIBLE SPR RESPONSE TIME <3 TO 6 MONTHS> THAT DO ALL DEC LAYERED
        SOFTWARE PARDUCTS.


        RSX-11M V3.1
        Datatrieve-11 Version 1.1

        Space Exhausted During Execution of Certain Requests

        PROBLEM:

        When Datatrieve performs a data conversion from a value with a non-zero scale
        factor to an ascil string it fails to return an internal block to the central
        storage  pools.    This results, sooner or later, in an exhausted central
        storage pool.

        SOLUTION:

        Install the patch by the following procedure.

        PROCEDURE:

              1.  Login to any privileged account.




                                                                                 32
              2.  Build the following correction file:  DTRQ07,MAC

                         .TITLE  CN
                         .IDENT  /V01.13/
                         .PSECT  CN
                  CN=,
                  ,=CN+404
                         CALL    PAT3
                  ,=CN+462
                         CALL    PAT4
                  ,=CN+510
                         CALL    PAT5
                         NOP
                         .PSECT  PATCH1
                  PAT3:  MOV     2(R0),R5
                         MOV     R0,R2
                         RT5     PC
                  PAT4:  MOVB    (R5)+,(R3)+
                         SOB     R1,PAT4
                         BR      PAT6
                  PAT5:  MOVB    #'0,(R3)+
                         SOB     R1,PAT5
                  PAT6:  MOV     R0.R1
                         MOV     R2,R0
                         CALL    ALRTN
                         MOV     R1,R0
                         RTS     PC
                         .END


              3.  Extract the original module from DIRLIB.

                  LBR CN,OLD=LB:(1,1)DIRLIB/EX:CN

              4.  Assemble the correction file.

                  MAC DTRQ07=DTRQ07

              5.  Run the "PAT" utility to correct the object module.

                  RUN SPAT
                  CN=CN,OLD,DTRQ07/CS:16166

              6.  Re-insert module into library.

                  LBR LB:(1,1)DTRLIB/RPzCN

              7.  Re-TASK-BUILD and run.

                  TKB *LB:(1,24)DTR11M,TKB




                                                                                33
        RSX-11M V3.1
        Datatrieve-11 Version 1.1


        Mysterious "Execution Failed" Message without Explanation

        PROBLEM:

        Certain  combinations of data types, when used in an arithmetic computation,
        can  cause  Datatrieve  to  abort  a request with no messages other than
        "Execution Failed."

        SOLUTION:

        Install the patch by the following procedure.

        PROCEDURE:

              1.  Login to any privileged account.

              2.  Build the following correction file:  DTRQ0B.MAC

                         .TITLE  AR
                         .PSECT  AR
                  AR=,
                  ,=AR+30
                         NOP
                  ,=AR+1172
                         NOP
                  ,=AR+1754
                         NOP
                  ,=AR+3122
                         NOP
                         .END

              3.  Extract the original module from DTRLIB.

                  LBR AR,OLD=LB:(1,1)DTRLIB/EX:AR

              4.  Assemble the correction file.




                                                                                34
                  MAC DTRQ08=DTRQ08

              5.  Run the "PAT" utility to correct the object module.

                  Run SPAT
                  AR=AR,OLD,DTRQ08/CS:5174

              6.  Re-insert module into library.

                  LBR LB:[1,1]DTRLIB/RP=AR


              7.  Re-TASK-BUILD and run.

                  TKB LB:[1,24]DTR11M.TKB

        RSX-11M V3,1
        Datatrieve-11 Version 1.1

        Extraneous (PR)PREXEQ Error Message is Generated

        PROBLEM:

        An  extraneous error message is generated when a reference is made to a file
        name qualified by a collection name is used in a report specification,
        message issued is:

                         (PF)PFEXEQ: EXPECTED IS, FD, OR CN BLOCK

        The report, in this case, is generated properly.

        SOLUTION:

        Install the patch by the following procedure.

        PROCEDURE:

              1.  Login to any privileged account.

              2.  Build the following correction file:  DTRQ04,MAC

                         .TITLE  PF
                         .IDENT  /V01.11/
                         .PSECT  PF
                  PF=.
                  .=PF+1432
                         TST     =0
                         .END




                                                                                35
              3.  Extract the original module from DTRLIB.

                  LBR PF,OLD=LB:[1,1]DTRLIB/EX:PF


              4.  Assemble the correction file.

                  MAC DTRQ04=DTRQ04

              5.  Run the "PAT" utility to correct the object module.

                  Run SPAT
                  PF=PF,OLD,DTRQ04/CS:5473

              6.  Re-insert module into library.

                  LBR LB:[1,1]DTRLIB/RP=PF

              7.  Re-TASK-BUILD and run.

                  TKB LB:[1,24]DTR11M,TKB




                                                                              36
                         FORTRAN SUPPORT FOR THE DEC RECORD MANAGER


                                         Fredric Gey

        Computer Science and Applied Mathematics Department
        Lawrence Berkeley Laboratory
                                 Berkeley, California  94720

              For those old FORTRAN hacks (like myself) turned DATATRIEVErs, the most
        exciting news at Fall DECUS in San Diego was the announcement of RMs indexed
        file support within the new version of FORTRAN.  This feature will work with
        an expansion of the syntax in the OPEN statement and the following additional
        I/O statements:

              REWRITE
              DELETE
              UNLOCK

        All I/O statements will now include an ERR= transfer location.

        What structures will be supported

              The  new language extensions will support multi-key index files (under
        RMS-11K only) for key types:

              String
              Integer*2
              Integer*4

        with operations of equality, approximate, or generic match.

        Sequential  and  keyed access will be allowed with up to 255 key fields for
        each record (a limit far beyond the capacity of DTR to use, as we all know).

              The  major  restriction within FORTRAN will be that duplicate primary
        keys  cannot  be  created  (alghough the language will access files with
        duplicate  primary  keys which were not created from FORTRAN).  Other than
        that, the support is available for all features generally available under the
        record manager, such as:

              fixed or variable length records
              shared file protection
              primary and alternate keys, with physical
                order determined by primary key value

        Also  supported  will  be what is called a USEROPEN facility for low-level
        access  to  the record manager.  I will not discuss this feature because it
        will have to be used with care by those sophisticated in the ways of RMS.

                                                    January 28, 1980




                                                                              37
                           FORTRAN Support for DEC Record Manager


        The New OPEN statement

              The new OPEN statement will avail itself of the following syntax:

        KEYWORD                   VALUES                   DEFAULT

        ACCESS                  'SEQUENTIAL'             'SEQUENTIAL'
                                'DIRECT'
                                'APPEND'
                                'KEYED'

        DISPOSE                    'SAVE'     or   'KEEP'                  'SAVE'
        DISP                    'PRINT'
                                'DELETE'

        KEY                     (K [,K] ...)

        ORGANIZATION            'SEQUENTIAL'             'SEQUENTIAL'
                                'RELATIVE'
                                'INDEXED'

        RECORDTYPE              'FIXED'                  depends on form
                                'VARIABLE'               and access
                                'SEGMENTED'

        USEROPEN                external function name

        An Example from DECUS Fall 1979

          The  following example was given in slides at the Fall Decus in San Diego
        which  amply illustrated the various new features.  The programmer wishes to
        use  FORTRAN to creat a file containing orders for a catalog sales company.
        The structure of the file is as follows:

          Key Name              Record Position          Key type

          order number              1:4                  INTEGER*4
          customer name             5:24                 STRING
          address                  25:74                 STRING
          item number              75:76                 INTEGER*2

        This file would be opened with the following statement:

             OPEN (UNIT=10,NAME='CUSTOMERS.DAT',TYPE='NEW',
          1    ORGANIZATION='INDEXED',ACCESS='KEYED',
          2    RECORDTYPE='FIXED',FORM='UNFORMATTED',
          3    RECORDSIZE=19,KEY=(1:4:INTEGER,5:24,25:74,75:76:INTEGER)

                                                         January 28, 1980




                                                                              38
                            FORTRAN Suport for DEC Record Manager

        Note that:
               the default key type is STRING
               key position values may be integer expressions
               the first key specified is the primary key
               integer keys must be either 2 or 4 bytes long

        Writing Indexed Files

           In order to enter data into the catalog order file, the following statement
        would be used:
               WRITE(10,ERR=999) ORDER,NAME,ADDRES,ITEM   with   the
        understanding that

           key values should be written in order defined
           primary key value may not be omitted
           alternate key values may be duplicated

        The user should know that
           the RMS bucket containing the new record is locked
           the order of writing does not affect the sorted order

        Reading Indexed Files

        The statment

           READ(10,KEY=25638,KEYID=0,ERR=999) ORDER,NAME,ADDRES,ITEM

        will read the first record with primary key of 25638 (keyid=0 specifies the
        primary key), locking the bucket containing the record.  The general form of
        the read statement is

                {KEY  }
                {KEYEQ}
         READ(U,{KEYGE} = keyval [,KEYID=keynumber] [,ERR=s] [list]
                {KEYGT}

        Updating Indexed files

           Indexed files are updated by a READ followed by a REWRITE:

            READ(10,KEY=25638,KEYID=0,ERR=99) ORDER,NAME,ADDRES,ITEM
            NAME='Joel Smith'
            REWRITE(10,ERR=99) ORDER,NAME,ADDRES,ITEM

        Note that primary key values cannot be rewritten, but duplicate
        alternated keys may be created.

                                               January 28, 1980




                                                                              39
                            FORTRAN Support for DEC Record Manager

        Deleting Records from Indexed Files

           Similar to REWRITE , deleting records is done by a READ followed by a
        DELETE:

           READ(10,KEY=25638,KEYID=0,ERR=99) ORDER,NAME,ADDRES,ITEM
           DELETE(10,ERR=99)

        This operation locks the RMS bucket containing the record.  DELETE can be used
        on files with relative organization.

        Releasing a Bucket

           Since RMS provides shared file access in a multi-user environment, with
        protection provided by bucket locking, it will be mighty important for you the
        programmer to unlock your buckets after you are finished accessing them.  This
        is done with the UNLOCK statement:
                               UNLOCK unit
                               UNLOCK(unit,[ERR=statement number])

        What is this BUCKET?

           For those of you who have grown up with DATATRIEVE, and don't know anything
        about RMS, a bucket may be best defined as a group of physically contiguous
        records whose grouping size may be specified to minimize disk accesses.  The
        record manager follows a standard B-TREE pattern is setting up the structure of
        indexed files in order to provide efficient access.


                                                               January 28, 1980




