- ?         - get some help (same as HELP command)

    The ? comand provides on-line help about DBAG commands and terms used
    in commands syntax.

    The output can be directed to a file (using the option TO <file.ext>),
    instead of the terminal.

  Syntax :      ? <ret>     [TO <file.ext>]     available keywords
                ? *         [TO <file.ext>]     complete help on all keywords
                ? <keyword> [TO <file.ext>]     help pertaining to <keyword>

  Example:      ? display to display.doc
- @         - use command files

    The @ command enables execution of commands read from a command file.

  Syntax :      @ <file.ext>    (command file name)
 
  Example:      @query.jao
- <record#> - refers to a record to make current  (same as RECORD command)

    The <record#> "command" asks DBAG to make current the specified record.

  Syntax :      <record#>
 
  Example:      12
- APPEND    - include/restore/save records FROM/TO a data base or a file

    The APPEND command performs all kinds of data transfer between the screen
    (via DBAG editor),  data bases and files.   All possibilities are allowed,
    except for data transfer between two files.
+ Syntax :      APPEND  [BLANKS]       [TO <database | file.ext> [DBAG | SDF]
                                                                  [NEW | OLD]
 
                APPEND  [SCOPE  <scope list>]
                        [FOR    <expr. list>]
                        [FIELDS <field list>]
                         FROM <database> [TO <file.ext> [DBAG | SDF]
                                                         [NEW | OLD]  

                APPEND   FROM <file.ext> [DBAG | SDF] [TO <database>]
                                         [NOCHECK]
                                         [BYFIELDNUMBER | BYNAME | BYLIST]

  Example:      append from cars to cars.bck
+      You can specify FROM where you are reading the data and where you want
       to store it TO.

       If no TO expression is specified, the current data base is used as the
       output specification; if no FROM expression is specified, then, if you
       are appending to a file,  the  current data base  "profile" is used to
       edit records into the file.

        - If you are reading FROM a file or writing  TO a file, the  file name
          and extension must be supplied,  and the file  format can be  either
          DBAG (formatted ascii file) or SDF (system file data format).
          The default file extension is ".DBA" or ".SDF" respectively, and the
          default format is DBAG.
+       - When  appending  TO  a  file,  you  can create a new file or append
          to a pre-existing one,  by use of switches NEW or OLD.  The default
          is NEW.
+      If the append is FROM a data base, you can select the records you want
       to  transfer in two ways :

        - defining a  SCOPE  and/or  specifying any number of logical
          conditions on the data base fields using a  FOR  expression 

        - using the  CURRENT  SEARCH  for that data base (see  SEARCH 
          command).
+       You can specify which fields you want to transfer using the  FIELDS
        expression (default is all fields).

        In addition, you can append  blank  records (all fields with spaces),
        to a data base or to a file, using the switch BLANKS instead of FROM
        expression.
+       When appending from a file, if the option NOCHECK  is  specified,  the
        input data will NOT be validated (at your own risk !).

        If you are appending data from  data base or  from  file, the data can
        be transferred by FIELD NUMBER, by FIELD NAME or by  FIELD LIST, using
        the switches BYFIELDNUMBER ( my God!!!), BYNAME or BYLIST (the default
        is by FIELD NUMBER).
+                          === performance ===

        When using the APPEND command to load large amounts of data into a
        data base (e.g., append from a backup file),  it may be usefull to
        suspend the update of any index file  without  modifying  the data
        base structure.  You can do it  with the  command  SET INDEXES OFF
        before APPEND command and  SET  INDEXES  ON after.   YOU SHOULDN'T
        forget to  REINDEX the data base as well.

        Sequence of commands:   SET INDEXES OFF
                                APPEND FROM <file.ext> to <database>
                                SET INDEXES ON
                                REINDEX <database>
+      N.B.
       ----

                  APPEND   ...                  BYLIST

                  isn't implemented yet !!!!!!!!!!!!
- CANCEL    - cancel CURRENT SEARCH or CURRENT SORT for a data base

    The CANCEL command cancels the CURRENT SEARCH or the CURRENT SORT of
    a data base (current data base if none specified).

    See the commands SEARCH and SORT that provide the way to set CURRENT
    SEARCH and CURRENT SORT for any database. Also related, the commands
    SAVE and RESTORE to save or restore them.

  Syntax :      CANCEL    SEARCH | SORT    [DATABASE <database>]

  Example:      cancel search database cars_tst
- COPY      - copy data base structure into a new, empty data base 

    The COPY command copies the structure of a data base to a new, empty one.

  Syntax :      COPY STRUCTURE FROM <database> TO <new database>
 
  Example:      copy struct from cars to cars_tst
- CLOSE     - close a data base

    The CLOSE command closes current data base or specified data base.

  Syntax :      CLOSE [DATABASE  <database>]
 
  Example:      close cars
- CREATE    - create a new data base structure

    The CREATE command creates a new data base structure.

    You can CREATE a structure either in line mode or screen mode (see SET
    command).

  Syntax :      CREATE [<database>]
 
  Example:      creat cars_new
- DEFINE    - (re)define (standard) DISPLAY FORMAT

    The DEFINE DISPLAY command allows you to define a user display format
    instead of the standard display for the current data base.

    The defined display can be canceled by use of the option STANDARD,
    saved to a disk file using the SAVE DISPLAY command  and restored
    from a disk file using the RESTORE DISPLAY command.

  Syntax :      DEFINE DISPLAY [STANDARD]
 
  Example:      define display
+   Two formats are available:

         format 1: each record is presented on one-line-per-record basis;

                2: each record is presented on one-line-per-field basis;

         in both cases, each field can be presented in the usual way or
         under user-defined presentation.

    In addition, field mnemonics and field/record spacing can be
    suppressed/restored at will by use of the  SET NAMES and SET
    RAW commands.
- DELETE    - delete an entire data base

    The DELETE command deletes an entire data base.

  Syntax :      DELETE     DATABASE <database>

                        or

                DELETE     FILES    <database>
 
  Example:      delete database cars
- DISPLAY   - show data bases structures or records, DBAG status or commands

    Using the DISPLAY command, you can present:

        - the structure of a data base;
        - any selected records of a data base.
        - the data bases you are able to access;
        - the DBAG status (open data bases, current SETtings, etc);
        - the DBAG command buffer (see UP command);

    Any display can be directed to a file (using the option TO <file.ext>),
    instead of the terminal.
+ Syntax :      DISPLAY   [DATABASE <database>] STRUCTURE [TO <file.ext>]

                DISPLAY   [DATABASE <database>]
                          [SCOPE  <scope list>]       [SORT ON  <sort list>]
                          [FOR    <expr. list>]       [ON | OFF] [WAIT | NOWAIT]
                          [FIELDS <field list>]       [TO <file.ext >]

                DISPLAY   FILES     [<"wild"database name>]  [TO <file.ext>]
 
                DISPLAY   STATUS    [TO <file.ext>]
 
                DISPLAY   COMMANDS  [TO <file.ext>]

  Example:      display database cars for num .gt. 102 to cars.lst
+   If you want to use the second format (display records), you can select
    the records you want to display in two ways :

        - defining a  SCOPE  and/or  specifying any number of logical
          conditions on the data base fields using a  FOR  expression 

        - using the  CURRENT  SEARCH  for that data base (see  SEARCH 
          command).
+   You can specify also the fields you want to present and how, in two ways:

        - defining in the DISPLAY command itself, using the option FIELDS,
          witch fields should be presented and in witch order; the ON/OFF
          option causes the record number to be displayed or omitted.

        - defining a user defined DISPLAY FORMAT for that base (see
          DEFINE DISPLAY command)
+   The records can be  presented  ordered by any field or fields, ascending
    or descending order, using either the option SORT ON within  the DISPLAY
    command  (sort only during command execution),  or the  SORT command  to
    produce a sort on the data base that will remain permanent until the end
    of the interactive session.
+   Remember that DISPLAY and LIST commands are identical, except that the
    DISPLAY command asks,  every 15 lines display to the terminal,  if you
    want to continue displaying the information. Using the option WAIT/NOWAIT,
    this can be changed at will.
- EDIT      - modify data base record(s)

    The EDIT command allows editing of any selected records of a data base.

+ Syntax :      EDIT    [SCOPE  <scope list>]
                        [FOR    <expr. list>]
                        [FIELDS <field list>]     TO <database>
 
                EDIT    [SCOPE  <scope list>]
                        [FOR    <expr. list>]
                        [FIELDS <field list>]
                         FROM <database> [TO <file.ext> [DBAG | SDF]
                                                         [NEW | OLD]  

                EDIT    [FIELDS <field list>]
                         FROM <file.ext> [DBAG | SDF]     [TO <database>]

  Example:      edit all from cars to cars.bck
+      You can specify FROM where you are reading the data and where you want
       to store it TO, after beeing edited.

       If no TO expression is specified, the current data base is used as the
       output specification.

        - If you are reading FROM a file or writing  TO a file, the  file name
          and extension must be supplied,  and the file  format can be  either
          DBAG (formatted ascii file) or SDF (system file data format).
          The default file extension is ".DBA" or ".SDF" respectively, and the
          default format is DBAG.

        - When  editing TO a file,  you can  create a  new file or append to a
          pre-existing one, by use of switches NEW or OLD. The default is NEW.
+      If the edit is FROM a data base, you can select the records you want to
       edit in two ways :

        - defining a  SCOPE  and/or  specifying any number of logical
          conditions on the data base fields using a  FOR  expression 

        - using the  CURRENT  SEARCH  for that data base (see  SEARCH 
          command).

       You can specify which fields you want to edit using the FIELDS
       expression (default is all fields).
- EDT       - fast call to VMS editor EDT

  Syntax :      EDT  <file.ext>
 
  Example:      edt tst.cmd
- EXIT      - end of session (same as QUIT command)

    Use the EXIT (or QUIT) command to end a DBAG session.

  Syntax :      EXIT
 
  Example:      exit
- GOTO      - make a record current (same as RECORD command)

    The GOTO command makes specified record current (TOP = first record,
    BOTTOM = last record).

  Syntax :      GOTO      [RECORD <record#>]
                          [<record#>]
                          [TOP | BOTTOM]
 
  Example:      goto bottom
- HELP      - get some help (same as ? command)

    The HELP comand provides on-line help about DBAG commands and terms used
    in commands syntax.

    The output can be directed to a file (using the option TO <file.ext>),
    instead of the terminal.

  Syntax :      HELP <ret>     [TO <file.ext>]     available keywords
                HELP *         [TO <file.ext>]     complete help on all keywords
                HELP <keyword> [TO <file.ext>]     help pertaining to <keyword>

  Example:      help display
- INDEX     - index data base on specified field(s)

    Using the INDEX command, an index file is created to speed up record
    searching (see commands DISPLAY/LIST, SEARCH).

    Indexing may be cancelled with command NOINDEX, and re-built with command
    REINDEX.

  Syntax :      INDEX  [DATABASE <database>  ON  FIELDS  <field list>]
 
  Example:      index datab cars on field %3
+   If no ON FIELD phrase is specified, user will confirm the indexing of
    each of the data base fields.
    
- JOIN      - join data from two input data bases to form a 3rd data base

    The JOIN command allows you to create a new data base using all or part
    of data from two input data bases.

    You can pre-select the input records  and join only those  records from
    both bases that match any logical condition over fields from input data
    bases.    
+ Syntax :      JOIN     [DATABASE] <database1> SCOPE..., FOR..., FIELDS...

                WITH     [DATABASE] <database2> SCOPE..., FOR..., FIELDS...

                TO       [DATABASE] <database3> [JFOR... ]

  Example:      join database cars for %1=100:110 fields %3,%2 ;
                with database owners all ;
                to   database all_cars jfor %1=%4 .and. %1 .ne. %5
+   For both input data bases, you can pre-select the records you want to
    join in two ways :

        - defining a  SCOPE  and/or  specifying any number of logical
          conditions on the data base fields using a  FOR  expression 

        - using the  CURRENT  SEARCH  for that data base (see  SEARCH 
          command).

    You can also specify the fields you want to copy from both input data
    bases, using the option FIELDS for each of them.

    And,  last but not least,  the JFOR option will restrict the records to
    cross by imposing a logical condition over fields from both input bases.
+   The output data base fields will use the corresponding mnemonics of input
    data bases.  If the same  mnemonic  occurs twice in the  input data bases,
    user will be prompted for a new mnemonic.
- KILL      - kill data base records within SCOPE that satisfy FOR condition

    The KILL command allows suppressing those records of a data base  (the
    current data base if none specified) that match any logical conditions
    on its fields.  The "killed" records are LOST FOREVER,  but its record
    numbers can be re-used when "appending" new records to the data base.

  Syntax :      KILL      [DATABASE <database  >]
                          [SCOPE    <scope list>]
                          [FOR      <expr. list>]
 
  Example:      kill datab cars for %2 = 10
+   When you create a new data base structure  (CREATE command) or when you
    modify it  (MODIFY STRUCTURE command),  you can  specify if the  record
    numbers of the killed records will be re-used when APPENDing new records
    to the base, or if they will be appended at the bottom of the data base.
- LIST      - show data bases structures or records, DBAG status or commands

    Using the LIST command, you can present:

        - the structure of a data base;
        - any selected records of a data base.
        - the data bases you are able to access;
        - the DBAG status (open data bases, current SETtings, etc);
        - the DBAG command buffer (see UP command);

    Any listing can be directed to a file (using the option TO <file.ext>),
    instead of the terminal.
+ Syntax :      LIST      [DATABASE <database>] STRUCTURE [TO <file.ext>]

                LIST      [DATABASE <database>]
                          [SCOPE  <scope list>]       [SORT ON  <sort list>]
                          [FOR    <expr. list>]       [ON | OFF] [WAIT | NOWAIT]
                          [FIELDS <field list>]       [TO  <file.ext >]

                LIST      FILES     [<"wild"database name>]  [TO <file.ext>]
 
                LIST      STATUS    [TO <file.ext>]
 
                LIST      COMMANDS  [TO <file.ext>]

  Example:      list database cars for num .gt. 102 to cars.lst
+   If you want to use the second format (list records), you can select
    the records you want to list in two ways :

        - defining a  SCOPE  and/or  specifying any number of logical
          conditions on the data base fields using a  FOR  expression 

        - using the  CURRENT  SEARCH  for that data base (see  SEARCH 
          command).
+   You can specify also the fields you want to present and how, in two ways:

        - defining in the LIST command itself, using the option FIELDS,
          witch fields should be presented and in witch order; the ON/OFF
          option causes the record number to be listed or omitted.

        - defining a user defined DISPLAY FORMAT for that base (see
          DEFINE DISPLAY command)
+   The records can be  presented  ordered by any field or fields, ascending
    or descending order, using either the option SORT ON within  the DISPLAY
    command  (sort only during command execution),  or the  SORT command  to
    produce a sort on the data base that will remain permanent until the end
    of the interactive session.
+   Remember that DISPLAY and LIST commands are identical, except that the
    DISPLAY command asks,  every 15 lines display to the terminal,  if you
    want to continue displaying the information. Using the option WAIT/NOWAIT,
    this can be changed at will.
- MODIFY    - modify a data base structure

    Use the MODIFY command to change data base characteristics.

    If a data base is empty (i.e., no record AT ALL, "alive" or "killed"), any
    characteristic  can  be  changed;  if not, only  "textual" characteristics
    (descriptions, field names, etc.) can be changed.

  Syntax :      MODIFY STRUCTURE [TO <database>]

  Example:      modify struc to cars
- NOINDEX   - remove indexes on specified field(s) from data base

  Syntax :      NOINDEX  [DATABASE <database>  ON  FIELDS  <field list>]

  Example:      noindex datab cars on field %2
+   If no ON FIELD phrase is specified, user will confirm the de-indexing
    of each of the data base index fields.
- NEWS      - miscellaneous news about new features, known bugs, etc

    The NEWS comand provides mescellanoeus news about new features, known
    bugs, etc.

    The output can be directed to a file (using the option TO <file.ext>),
    instead of the terminal.

  Syntax :      NEWS <ret>     [TO <file.ext>]     available keywords
                NEWS *         [TO <file.ext>]     complete news on all keywords
                NEWS <keyword> [TO <file.ext>]     news pertaining to <keyword>

  Example:      news *
- OPEN      - open a data base (same as USE command)

  Syntax :      OPEN  [DATABASE]  <database>  [UPDATE | NOUPDATE]
 
  Example:      open cars update
- PAUSE     - suspend execution of a command file

  Syntax :      PAUSE

  Example:      pause
- QUIT      - end of session (same as EXIT command)

    Use the QUIT (or EXIT) command to end a DBAG session.

  Syntax :      QUIT
 
  Example:      quit
- RECALL    - get a command from the command buffer (same as UP command)

    The RECALL [<n>] command gets the nth command from the command buffer.
    To get back the last executed command, just type RECALL.

    If you enter the command RECALL <whatever>, the command buffer is
    searched for whatever you have typed.

  Syntax :      RECALL [<n>] or RECALL <whatever>

  Example:      recall 3
- REINDEX   - re-index data base on specified field(s)

  Syntax :      REINDEX  [DATABASE <database>  ON  FIELDS  <field list>]
 
  Example:      reind database cars on field %3
+   If no ON FIELD phrase is specified, user will confirm the re-indexing
    of each of the data base index fields.
- RELOAD    - reload an entire data base from a disk file

    The RELOAD command provides fast reloading of an EMPTY data base from a
    a disk file in SDF format.

  Syntax :      RELOAD     [FROM <file.ext>]   [SDF]

                           [NOCHECK]

                           [TO DATABASE <database>]

  Example:      reload cars
- REPLACE   - replace data base records

    The REPLACE command allows replacing records of a data base.

  Syntax :      REPLACE   FROM <file.ext> [DBAG | SDF]
                         [NOCHECK]
                          TO <database>
                         [FIELDS <field list>] 

  Example:      replace from cars.bck to cars
+       - The file name and extension must be supplied; the file format can
          be either DBAG  (formatted ascii file) or SDF  (system file  data
          format).

          The default file extension is ".DBA" or ".SDF" respectively,  and
          the default format is DBAG.

        - If the option NOCHECK is specified, the input data read from file
          will NOT be validated (at your own risk !).

        - You can specify which fields you want to replace using the FIELDS
          expression (default is all fields).

- RESTORE   - restore a base context or the DBAG command buffer from a SAVE file

    The RESTORE command restores the CURRENT SEARCH, the CURRENT SORT, the
    DISPLAY FORMAT or the  DBAG command buffer from a SAVE file  (see SAVE
    command).

  Syntax :      RESTORE    SEARCH | SORT | DISPLAY | COMMANDS    FROM <file.ext>
 
  Example:      restore sort from cars.sr1
- SAVE      - saves a base context or the DBAG command buffer to a file

    The SAVE command saves the CURRENT SEARCH, the CURRENT SORT, the DISPLAY
    FORMAT or the DBAG command buffer to a SAVE file.  This file can be used
    later to "restore" it (see RESTORE command).

  Syntax :      SAVE    SEARCH | SORT | DISPLAY | COMMANDS    TO <file.ext>

  Example:      save display to cars.ds1
- SEARCH    - search data base records within SCOPE that satisfy FOR condition

    The  SEARCH command allows searching those records of a data base  (the
    current data base if none specified)  that match any logical conditions
    on its fields. The "searched records" become the "CURRENT SEARCH" until
    a new SEARCH, CANCEL SEARCH or RESTORE SEARCH command is issued.

  Syntax :      SEARCH    [DATABASE <database  >]
                          [SCOPE    <scope list>]
                          [FOR      <expr. list>]
 
  Example:      search all datab cars
- SET       - sets DBAG control parameters

  Syntax :      SET       <parameter>      <ON | OFF>

                          <parameter> [TO] <option>

  Example:      set  intensity off  alternate to dbag.alt  width 132
+   SET ALTERNATE <OFF | on> - ON sends screen output to alternate disk file.

    SET ALTERNATE TO  <file> - (re)opens a disk file for saving screen output.

    SET BELL      <ON | off> - ON rings when invalid data is entered or data
                               field boundary is passed.

    SET CARRY     <OFF | on> - ON repeats data in current record from previous 
                               record when using APPEND command.

    SET COLON     <ON | off> - ON display character to bound input data fields.

    SET COLON     TO  <'c'>  - Sets character c as bounding character.
+   SET CONFIRM  <ON | off>  - If OFF, "dangerous" commands will NOT prompt the
                               user to confirm (DELETE, ZERO, JOIN commands).

    SET ECHO     <ON | off>  - ON enables monitoring of command file execution
                               by echoing command execution to screen.

    SET ERRORSTOP<ON | off>  - If ON, DBAG stops if an error occurs when reading
                               data from a disk file (APPEND, RELOAD and REPLACE
                               commands).

    SET HEADER   <ON | off>  - ON shows current DATA BASE, RECORD and SEARCH on
                               top of screen.
+   SET INDEXES  <ON | off>  - ON enables index files update (OFF disables it
                               AT YOUR OWN RISK, see APPEND command !).

    SET INTENSITY<ON | off>  - ON enables reverse video on input data fields.

    SET NAMES    <ON | off>  - ON enables field mnemonics to be shown on display

    SET PADDING  <ON | off>  - ON enables padding of empty places of fields

    SET PADDING   TO  <'c'>  - Sets character c as padding character.

    SET PROMPT   TO <'str'>  - Sets string str as DBAG prompt.
+   SET RAW      <OFF | on>  - ON DISPLAYs and LISTs data from records/fields
                               without a blank line/space inserted between.

    SET SCREEN   <OFF | on>  - ON enables screen facilities when executing the
                               CREATE/DISPLAY/MODIFY STRUCTURE commands

    SET TALK     <ON | off>  - ON shows results of command execution on screen

    SET VERIFY   <OFF | on>  - ON directs DBAG to check every record within a
                               <scope list>: if ON, an EXTRA OVERHEAD will be
                               added when executing DISPLAY/SEARCH commands.

    SET WIDTH   TO <width>   - Sets terminal width to 80 or 132, depending on
                               specified value.
- SORT      - sort data base records on specified sort list

    The SORT command sorts the records currently selected (see SEARCH and
    RESTORE commands) and  these  records remain sorted and  available to
    display commands until the end of DBAG session.

  Syntax :      SORT  [DATABASE  <database>]  ON  <sort list>
 
  Example:      sort datab cars on date a, num d
- TERMS     - definition of terms used to explain each command

  <field>      =  field mnemonic or %field number or record#
                  (e.g. ADDRESS or %4 or #)
 
  <field list> =  <field>, <field>, ...
 
  <sort list>  =  <field> A or D, <field> A or D, ...
                  ( A ascending, D descending)
  
  <expr. list> =  list of logical conditions on record fields
+ <arit. exp.> =  any arithmetic expression
 
  <scope list> =  [TOP | BOTTOM | ALL | CURRENT] or [RECORD <n>] or [<n>] or
                  [NEXT <n>] or [ t | b | c [:t | b | c ] or <n>[:<n>], ...
 
  <parameter>  =  one of the parameters allowed for command

  <option>     =  argument according to specified SET TO <parameter>

  <database>   =  data base name
+ <"wild"dat.> =  database name(s) list with wild card, e.g. S%A*, ...
 
  <file.ext>   =  Vax/vms file name and extension

  <'c'>        =  single character string c

  <'str'>      =  character string str

  <record#>    =  data base record number

  <n>          =  positive number

  <ret>        =  carriage return
- TPU       - fast call to VMS editor TPU

  Syntax :      TPU  <file.ext>
 
  Example:      tpu tst.cmd
- UNLOAD    - unload ALL records of a data base to a disk file

    The UNLOAD command provides fast unloading of all records of a data base
    to a disk file in SDF format.

  Syntax :      UNLOAD     [FROM DATABASE <database>]

                           [TO <file.ext>]   [SDF]

  Example:      unload cars
- UP        - get a command from the command buffer (same as RECALL command)

    The UP [<n>] command gets the nth command from the command buffer.
    To get back the last executed command, just type UP.

    If you enter the command UP <whatever>, the command buffer is searched
    for whatever you have typed.

  Syntax :      UP [<n>] or UP <whatever>

  Example:      up 3
- USE       - use a data base (same as OPEN command)

  Syntax :      USE  [DATABASE]  <database>  [UPDATE | NOUPDATE]
 
  Example:      use cars update
- VMS       - submit DCL command(s) without leaving DBAG

  Syntax :      VMS  [<VMS command>]
 
  Example:      vms dir *.ds1
- ZERO      - remove all records from a data base

    The ZERO command removes all records from a data base, i.e, none of
    the existing records can be accessed anymore.

  Syntax :      ZERO    DATABASE <database>

                     or

                ZERO    FILES    <database>

  Example:      zero database cars_old
