home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DQ13.ZIP / DQ.DOC next >
Text File  |  1989-05-09  |  53KB  |  1,070 lines

  1.   DQ   Quick Database Utility
  2.        written by Richard Dower
  3.        Copyright (c) 1989    All rights reserved.
  4.  
  5.   What is DQ ???
  6.  
  7.   DQ is a utility for getting information about dBASE files.
  8.   All of DQ's activity is read-only and therefore will not alter your
  9.   files in any way.  (This may change if there is enough interest.)
  10.   It allows you to display the structure, browse, count, locate, sum,
  11.   average and goto specific records.  It also allows you to find what 
  12.   each index file in your directory is indexed on and whether that index
  13.   is a possible index for the current database file.   It is primarily 
  14.   for DP professionals who need quick information about dBASE files. 
  15.   DQ gives them information about files and indexes that is usually only
  16.   available by reading the documentation for a specific dBASE application,
  17.   by talking to the original programmer, or using a debugger.
  18.  
  19.   One of the best features is the ability to open two files at once and
  20.   view them both on a split screen.  You can then relate the two files
  21.   through a common character field.  Then, when you move in the first 
  22.   file, you are moved in the second file to the record whose related field
  23.   matches the first file's.  
  24.  
  25.   DQ is small enough that you can usually run it from within your
  26.   word processor or from within dBASE, Foxbase, or DBXL.   Its great for
  27.   finding how indexes are indexed, browsing two files simultaneously, or
  28.   doing quick sums or locates.  
  29.  
  30.   I have found DQ invaluable when writing an application which relates
  31.   two files.  There is no easy way to view the fields from two separate
  32.   databases within dBASE.  DQ not only allows you to view records from
  33.   two different databases simultaneously, but it allows you to relate any
  34.   two matching character fields.  You can quickly browse two files which
  35.   both have a social security field in common, for instance.  Or, you can
  36.   even open the same file in both work areas and by relating a field to
  37.   itself, you can view 40 fields at one time for the same record!  Simply
  38.   select a different set of fields to display in either work area.
  39.  
  40.   Having trouble with an accounting application which uses an ACCOUNTS
  41.   file and a TRANSACTION file related by an account number?  With DQ you
  42.   can easily browse through the data by relating the TRANSACTION file to
  43.   the ACCOUNTS file through the account number.  Then, when you look at
  44.   a transaction, you will see all the information about the account also.
  45.   You can also LOcate for a specific account number or SUM withdrawals,
  46.   deposits, or balances in either database.  The SUM command will also give
  47.   you maximum, minimum, count and average.
  48.  
  49.   Commands Supported so far:
  50.  
  51.     CHECK           check for records with non-printable characters
  52.     COUNT           counts records matching a condition
  53.     DIRECTORY       shows all databases in current index and allows
  54.                     opening of a database by light bar selection
  55.     DIRECTORY INDEX shows all the indexes in the current directory,
  56.                     shows how it is indexed, and whether it is a possible
  57.                     index for the currently opened database.
  58.     FIELDS          show the fields and their definitions
  59.     GOTO            goto a specific record number
  60.     HELP            gives help about any command
  61.     LOCATE          locate a record matching a condition
  62.     NEXT            next locate
  63.     QUIT            quit 
  64.     RELATE          relates two databases by a common field
  65.     SKIP            skip n records forward or back
  66.     STATISTICS      display structure 
  67.     SUM             sums a numeric field on a condition
  68.                     Shows number of records matching condition,
  69.                     sum, average, maximum, and minimum.
  70.     USE             open a database
  71.  
  72.   Functions Supported so far:
  73.     VAL(character field)       used in the SUM command only
  74.     LEFT(field,length)         used in COUNT and LOCATE
  75.     RIGHT(field,length)        used in COUNT and LOCATE
  76.     SUBSTR(field,start,length) used in COUNT and LOCATE
  77.   See the section after the command summaries for a fuller explanation
  78.   of the functions.
  79.  
  80.   All commands in DQ may be truncated to two characters and there is 
  81.   a 10 command buffer that allows you to edit and re-execute previous
  82.   commands.
  83.  
  84.   The current record is always displayed, so there is no need for the
  85.   DISPLAY command.  If there is more than a screen full of fields,
  86.   F2 will toggle between the multiple pages of fields.  
  87.  
  88.   The current record number, whether the current record is deleted,
  89.   total numer of records, and the date the file was last updated are 
  90.   always displayed on the screen.  DQ can also give number of fields,
  91.   field names, field types, file header size and record size. 
  92.  
  93.   You have two work areas to open files within.  Pressing F3 will move
  94.   to the other work area.  You may split the screen so that both work
  95.   areas are showing at the same time by pressing F4.  Pressing F4 again
  96.   will unsplit the screen.  Each work area works exactly as a stand alone
  97.   version of DQ.  The bottom of the screen will let you know which 
  98.   work area has been selected and all windows and messages will appear
  99.   in the active window if the screen is split.
  100.  
  101.   Online Help is available by pressing F1 or entering HELP on the command 
  102.   line.  HELP followed by a command will give help on that specific command.
  103.  
  104.   Version 1.3 
  105.                 1.  Fixed some a positioning bug after a failed LOCATE.
  106.                 2.  Fixed a bug in numeric field compares in conditional
  107.                     statements.  
  108.                      Example:  sum salary salary > 0
  109.                     I mistakenly compiled version 1.2 without a certain
  110.                     header file and what had always worked for me didn't
  111.                     work on the release version!!
  112.                 3.  Added the substr() function.
  113.                     
  114.   Version 1.2   
  115.                 1.  Now has two work areas.  You may have two different 
  116.                     databases open at the same time.
  117.                 2.  Allows splitting the screen to view both open 
  118.                     work areas at the same time.
  119.                 3.  You may relate the database in WORK AREA 1 with the one
  120.                     in WORK AREA 2 on a common field.  Then, whenever you
  121.                     move within the database in area 1, the record is found
  122.                     in area 2 that matches the related field.  You may 
  123.                     relate any character field from area 1 with one in 
  124.                     area 2 as long as they are the same length.  No need
  125.                     to have an index active.  This is great for browsing
  126.                     data that is normally accessed though a dBASE program
  127.                     with SET RELATION command active.  
  128.                 4.  Supports the VAL() function for summing numeric data
  129.                     in character fields.
  130.                 5.  Supports the LEFT() and RIGHT() functions for COUNTing
  131.                     and LOCATEing partial matches within character fields.
  132.  
  133.  
  134.                Shareware is not free software.   If you use and like 
  135.          the program, then the I ask that you register (purchase) the
  136.          program for an amount much smaller than an equivalent commercial
  137.          program ($10.00).  By registering you will receive notice of 
  138.          available upgrades.  Keep in mind that the purchase of a program 
  139.          from a public domain distributor or payment to an online service 
  140.          (such as GENIE) does NOT constitute registration of the program 
  141.          since I do NOT receive any money from that payment.    Shareware
  142.          is NOT public domain software, and continued use of a program 
  143.          carries with it the OBLIGATION to purchase the program.  The free 
  144.          distribution method is intended only as a means of obtaining a 
  145.          copy to evaluate before purchasing.
  146.              DQ is a shareware  program.  If you use it, please REGISTER.
  147.          You will be placed on a mailing list for any future upgrade
  148.          notices, and will be registered as a user of this product.  
  149.  
  150.               DQ is very useful as it stands but will be continually 
  151.          enhanced.  I will let users determine the functions that they 
  152.          would most like to have added and build from there.  Future 
  153.          plans include expanded functions support, possibly adding more
  154.          work areas, relating on partial string matches, and printed
  155.          reports.
  156.  
  157.          Registration is currently $10.00.  As features are added, this may
  158.          be increased.  Get in on the ground floor.
  159.          For those interested in source code or libraries please contact
  160.          me for prices and availability.  DQ is written in Microsoft C 
  161.          with Essential's ScreenStar for the screen interface.
  162.  
  163.        Send registrations to:
  164.                      Richard Dower
  165.                      13943 West 113th Street
  166.                      Lenexa, Ks.
  167.                      66215
  168.  
  169.                            Phone : (913) 339-9348
  170.  
  171.   DQ is provided  without warranty of any kind, either expressed or implied.
  172.   The user of DQ agrees to hold the author of this material harmless for 
  173.   any direct or consequential damages resulting from its use.    
  174.  
  175.  dBASE is a trademark of Ashton Tate. 
  176.  DBXL is a trademark of WordTech.
  177.  WordStar is a trademark of MicroPro International.
  178.  FoxBase is a trademark of Fox Software.
  179.  
  180.   Why use DQ? 
  181.     1.  DQ can give you information the dBASE doesn't.
  182.         A.  DIR shows all the files in the current directory, how many
  183.             records each has, the number of fields, when last updated,
  184.             and the record size.
  185.  
  186.         B.  The current record is always displayed.  The command line prompt
  187.             shows the active database.  The current record number, total 
  188.             number of records, whether the record is deleted, and the date
  189.             last updated are always displayed.  In the example below,
  190.             TEST is the active database.  Since there are more than 22 fields 
  191.             in TEST, you can use F2 to move through the other fields.
  192.             NOTE: the field STRING ends with two greater than signs, >>.
  193.             This means the field is to large to display, i.e. more than 
  194.             66 characters.
  195.  
  196.             Sample screen:
  197.  
  198.   Record Number:     1 of     6  DELETED               Last Update: 04/06/89
  199. NUMBER     :    100.30:
  200. INTEGER    :  43:
  201. LOGICAL    :T:
  202. DATE       :09/09/88:
  203. STRING     :This is the maximum length allowed for a field.  It is 254 cha>>
  204. SMALL      :1:
  205. BIG        :1111111111111.11100:
  206. F8         : :
  207. F9         : :
  208. F10        : :
  209. F11        : :
  210. F12        : :
  211. F13        : :
  212. F14        : :
  213. F15        : :
  214. F16        : :
  215. F17        : :
  216. F18        : :
  217. F19        : :
  218. F20        :1:
  219. F21        : :
  220. F22        : :
  221.   F2 for more fields...
  222. TEST>
  223.  
  224.         C.  DIR INDEX shows how each index file in the directory is indexed.
  225.             It also tells you if the selected index is a possible index
  226.             for the active database file.  If not, it tells you which field
  227.             doesn't match.   It also supports FoxBase indexes.
  228.  
  229.         D.  CHECK will check records in the selected database for characters
  230.             not normal to dBASE files.  It will stop on the first record that 
  231.             contains any non-printable character.  The existence of one of 
  232.             these characters in a record usually means that that record has
  233.             been corrupted.  It checks for graphics characters and characters
  234.             below the space on an ascii character chart.  Some of the more
  235.             familiar ones are "happy faces" and ESCAPE.
  236.  
  237.     2.  Speed and size.  DQ is a small program and can thus be loaded 
  238.         quickly and in a small amount of memory.  It can be carried around
  239.         on a utility disk for browsing files, simple locates and counts,
  240.         summing selected fields to check program output, and determining 
  241.         indexes.  You don't need multiple disks of dBASE, FoxBase, or DBXL 
  242.         to troubleshoot dBASE files.  My own benchmarks for COUNT and LOCATE 
  243.         show speeds faster than DBXL and dBASE and comparable to FoxBase.
  244.         Since SUM gives the count, average, maximum and minimum, there is 
  245.         no comparable dBASE equivelant for comparison.  You would have to
  246.         write a program or do multiple commands to get the same information.
  247.  
  248.  
  249.   Some scenerios where DQ is useful.
  250.  
  251.   Example:  You are in your text editor or word processor.  To complete
  252.   your program, or documentation, you need to know the structure of a 
  253.   certain database and how its associated indexes are indexed.  You have
  254.   two choices :
  255.      1.  Since DBXL, dBASE, and FoxBase are usually too large to load
  256.          from within another program, and programs like Brief and WordStar
  257.          are too large to load from within DBXL, dBASE, or FoxBase, you need
  258.          to do the following.
  259.             A.  Remember where you are and quit your program. 
  260.             B.  Load DBXL, dBASE, or FoxBase. 
  261.             C.  USE the database of interest with all the indexes.
  262.             D.  Display the structure of the database.
  263.             E.  Display the status.
  264.             F.  Quit your database manager.
  265.             G.  Re-load your text editor.
  266.             H.  Go back to where you left off.
  267.          Some of the major time in the above operation is spent loading
  268.          and reloading large applications.
  269.  
  270.      2.  A. Escape to DOS without exiting your text editor or word processor.
  271.          B. Run DQ.
  272.          C. USE the database
  273.          D. The FIELDS command will show the fields.
  274.          E. DIR INDEX will tell you how all the index files are indexed.
  275.          F. Return to your original program.
  276.  
  277.   Example:
  278.      You have received a dBASE application with no documentation that was
  279.      developed somewhere in your organization.  You are expected to support
  280.      the program.  With the application are eight databases and fifteen 
  281.      indexes.  By using DQ, you can quickly see how all the indexes are
  282.      indexed, and by USING each of the databases in turn, you can determine
  283.      which indexes are possible matches with which databases.  Even having
  284.      the source code for an application will not always get you that
  285.      information. Or, if it does, it takes a lot of digging.
  286.      
  287.  
  288. Sample non-split screen.
  289.  
  290. Notice:   The database name is part of the prompt.  (TEST2)
  291.           The current record number and total number of records is shown.
  292.           The last update of the database is shown at the upper right.
  293.           The active work area is shown at the lower right. (AREA 2)
  294.           The SUM command output shows that only 7 of the 20 possible
  295.           records matched the seach condition "substr(string,2,3) owe".
  296. ┌───────────────────────────────────────────────────────────────────────────┐
  297. │  Number:     1 of    20                           Last Update: 04/16/89   │
  298. │NUMBER    :    100.30:                                                     │
  299. │INTEGER   :  43:                                                           │
  300. │LOGICAL   :T:                                                              │
  301. │DATE      :09/09/88:                                                       │
  302. │STRING    :testi                                                         >>│
  303. │SMALL     :1:                                                              │
  304. │BIG       :1111111111111.11100:                                            │
  305. │KEY2      :EEE:                                                            │
  306. │F9┌────────────── SUM ───────────────┐                                     │
  307. │F1│                                  │                                     │
  308. │F1│   Count: 7                       │                                     │
  309. │F1│     Sum:  22222222222222.22000   │                                     │
  310. │F1│ Average:   3174603174603.17500   │                                     │
  311. │F1│ Maximum:   4444444444444.44400   │                                     │
  312. │F1│ Minimum:   2222222222222.22200   │                                     │
  313. │F1│                                  │                                     │
  314. │F1│ DONE-Hit a Key                   │                                     │
  315. │F1└──────────────────────────────────┘                                     │
  316. │F19       : :                                                              │
  317. │F20       : :                                                              │
  318. │ F2 for more fields...                                       WORK AREA 2   │
  319. └───────────────────────────────────────────────────────────────────────────┘
  320. TEST2>sum big for substr(string,2,3) = owe
  321.  
  322. Sample split screens with two different databases.  The bottom line of the
  323. window tells which area is active.  The two screens that follow show how
  324. you can SELECT a different area (F3) quickly and the operation that is
  325. performed on that database gives its results in the area selected.  In 
  326. the following examples, the SUM command was performed first in area 1,
  327. then in area 2. (The screens have been trimmed slightly to fit on a printed
  328. page.)
  329.  
  330. Notice:   The database names are at the top of each work area window.
  331.           The current record number and total number of records is shown
  332.           for both work areas.
  333.           The prompt and the SELECTED message shows the selected database.
  334.  
  335. ┌─────────────────\PD\TRANS────────────┐┌─────────────────\PD\PD─────────────┐
  336. │  Number:     1 of    33              ││  Number:     1 of   100            │
  337. │ACT_NO    :5    :                     ││ACT_NO    : 5   :                   │
  338. │DEPOSIT   :      345.00:              ││MAILER    :A. C. DELCO-SP         >>│
  339. │WITHDRAWAL:      222.00:              ││ADDRESS   :                       >>│
  340. │DATE      :02/12/87:                  ││CITY      :                    :    │
  341. │                                      ││STATE     :  :                      │
  342. │                                      ││ZIP       :          :              │
  343. │                                      ││PHONE     :        :                │
  344. │                                      ││BALANCE   :     -678.20:            │
  345. │  ┌─────────── SUM ───────────┐       ││REMARKS   :                    :    │
  346. │  │                           │       ││PREV_DATE :02/11/87:                │
  347. │  │   Count: 27               │       ││                                    │
  348. │  │     Sum:        3476.34   │       ││                                    │
  349. │  │ Average:         128.75   │       ││                                    │
  350. │  │ Maximum:         543.00   │       ││                                    │
  351. │  │ Minimum:           2.00   │       ││                                    │
  352. │  │                           │       ││                                    │
  353. │  │ DONE-Hit a Key            │       ││                                    │
  354. │  └───────────────────────────┘       ││                                    │
  355. │                                      ││                                    │
  356. │                                      ││                                    │
  357. │                             SELECTED ││                                    │
  358. └──────────────────────────────────────┘└────────────────────────────────────┘
  359. \PD\TRANS>sum deposit deposit > 0
  360.  
  361.  
  362. ┌─────────────────\PD\TRANS─────────┐┌─────────────────\PD\PD───────────────┐
  363. │  Number:     1 of    33           ││  Number:     1 of   100              │
  364. │ACT_NO    :5    :                  ││ACT_NO    : 5   :                     │
  365. │DEPOSIT   :      345.00:           ││MAILER    :A. C. DELCO-SP           >>│
  366. │WITHDRAWAL:      222.00:           ││ADDRESS   :                         >>│
  367. │DATE      :02/12/87:               ││CITY      :                    :      │
  368. │                                   ││STATE     :  :                        │
  369. │                                   ││ZIP       :          :                │
  370. │                                   ││PHONE     :        :                  │
  371. │                                   ││BALANCE   :     -678.20:              │
  372. │                                   ││RE┌─────────── SUM ───────────┐:      │
  373. │                                   ││PR│                           │       │
  374. │                                   ││  │   Count: 6                │       │
  375. │                                   ││  │     Sum:       -3924.98   │       │
  376. │                                   ││  │ Average:        -654.16   │       │
  377. │                                   ││  │ Maximum:           0.00   │       │
  378. │                                   ││  │ Minimum:       -3228.67   │       │
  379. │                                   ││  │                           │       │
  380. │                                   ││  │ DONE-Hit a Key            │       │
  381. │                                   ││  └───────────────────────────┘       │
  382. │                                   ││                                      │
  383. │                                   ││                                      │
  384. │                                   ││                             SELECTED │
  385. └───────────────────────────────────┘└──────────────────────────────────────┘
  386. \PD\PD>sum balance balance <= 0
  387.  
  388.  
  389.   Limitations:
  390.      Please let me know which of the following are important to you as
  391.      a user.  I suggest you place DQ.EXE somewhere in your path so
  392.      you can call it from any directory.
  393.      
  394.   1.  You may not change your default directory while in DQ.
  395.  
  396.   2.  AND and OR have not yet been added.  
  397.  
  398.        You can :
  399.          COUNT FOR STATE = KANSAS
  400.                or
  401.          CO NOT STATE KANSAS
  402.                or
  403.          CO NOT NAME = "Richard Dower"
  404.                or
  405.          CO salary < 50000
  406.  
  407.          LOCATE FOR STATE = KANSAS
  408.                or
  409.          LO NOT FEMALE                   ( FEMALE is a Logical field)
  410.                or
  411.          LOCATE FOR NOT MALE
  412.                or
  413.          lo tax >= 1.50
  414.  
  415.          SUM tax tax >= 1000
  416.                or
  417.          su salary female
  418.  
  419.        You can't:
  420.          COUNT FOR STATE = KANSAS AND FEMALE
  421.               or
  422.          LOCATE FOR NAME = "Richard Dower" AND STATE KANSAS
  423.               or
  424.          SUM SALARY FOR TITLE = "MANAGER" OR TITLE = "SUPERVISOR"
  425.  
  426.   3.  The command line will not wrap.  The limit for one command is the end
  427.       of the command line.  If you open a file that is not in the current
  428.       directory and it has an extremely long path name, you will have a
  429.       smaller available command line.  Since all the commands can be 
  430.       abbreviated to two characters and since .and. and .or. have not
  431.       been implemented, this should not be a limiting factor.
  432.  
  433.   4.  No printout of the information beyond screen dumps is available.
  434.   5.  Fields longer than 66 characters are only partially displayed.
  435.       This has no effect on the files I normally use but others may need
  436.       to display a full 254 characters.  Let me know.
  437.  
  438.  
  439.  To move between records without using LOCATE, SKIP or GOTO use
  440.  the following cursor keys :
  441.  
  442.       PgUp = up one record       Ctrl + Home = Top of File     
  443.       PgDn = down one record     Ctrl + End  = Bottom of File  
  444.  
  445.  You may move back through up to 10 previously entered commands by using
  446.  the up and down cursor keys.
  447.  
  448.  Editing on the command line:
  449.  NOTE: Ins does not toggle between insert and overwrite.  It inserts one
  450.        character under the cursor.  To insert a word, press Ins multiple
  451.        times first.
  452.  
  453.                    Left Arrow - left one character.
  454.                   Right Arrow - right one character.
  455.                        Delete - delete character under cursor.
  456.                     BackSpace - delete character to the left of the cursor.
  457.                          Home - start of a field.
  458.                           End - end of a field.
  459.                           Ins - insert one space under the cursor and
  460.                                 move existing text to the right.
  461.  
  462.         Control + Right arrow - next word
  463.          Control + Left arrow - previous word
  464.                        Escape - clears a field and moves cursor
  465.                                 to the beginning of the field.
  466.  
  467.  
  468. CHECK
  469.        Checks the current database for bad records.
  470.        A bad record is any record containing ascii characters
  471.        below space and above the ~ character.  That is, below
  472.        32 and above 126 on an ascii character chart.
  473.        If any of these characters were in a record, it would mean
  474.        that that record had been corrupted.
  475.  
  476.        CHECK stops at the first record that is bad.
  477.        To search for more bad records, run &2CHECK again.
  478.  
  479.  
  480. COUNT 
  481.   Syntax: COUNT [FOR] [NOT] <field> [=, >, >=, <, <=] value 
  482.  
  483.        Count occurances, or non-occurances, of value in field.
  484.        Counting starts from and includes the current record.
  485.        Values containing spaces should be surrounded by double quotes.
  486.        Examples:  CO NOT CITY "OVERLAND PARK"
  487.                   CO ST KS
  488.                   COUNT FOR NOT ZIPCODE = 66212
  489.                   COUNT ZIPCODE = "66212"
  490.                   count name "Richard Dower"
  491.                   CO SALARY >= 50000
  492.                   co for taxes < 100.50
  493.                   co left(depart,3) MIS
  494.                   co right(zip,3) 215
  495.                   co substr(address,5,6) "OAK ST"
  496.  
  497.        Note: the >, <, >=, and <= are for numeric fields only.
  498.  
  499.  
  500.     Sample screen illustrating the COUNT command.
  501.     The active database is CFS64111 (note the prompt on the bottom line).
  502.     The COUNTed field is LOCAL and is a logical field.
  503.  
  504.           Record Number:     1 of  1602
  505.         LAST       :DOWER               :
  506.         FIRST      :RICHARD      :
  507.         NEW_PRIM   :13943 WEST 113TH STREET         :
  508.         OLD_PRIM   :7521 WEST 96TH TERRACE    :
  509.         CODE       :DOW521:
  510.         CITY       :OVERLAND PARK:
  511.         STATE      :KS:
  512.         ZIP        :66212:
  513.         PLUS4      :2317:
  514.         USER       :31:     ┌────── COUNT ───────┐
  515.         FOREIGN    :F:      │                    │
  516.         DNF        :O:      │  Count = 1330      │
  517.         LOCAL      :T:      │                    │
  518.         INDIV      :F:      │  DONE  Press a Key │
  519.         TEMP       :F:      │                    │
  520.         MILITARY   :F:      └────────────────────┘
  521.         FORTH      :F:
  522.         E_DATE     :03/01/89:
  523.         T_DATE     :  /  /  :
  524.         UNIQUE     :1A :
  525.         
  526.         
  527.         
  528.         CFS64111>co local
  529.  
  530. DIRECTORY
  531.  
  532.    In the example below, the light bar was positioned over the file ADJ0.
  533.    To use the file, simply press RETURN when the light bar is over the 
  534.    desired file name.  Optionally, you could have typed USE ADJ0 on the 
  535.    command line.  When a database is opened, its name becomes part of the 
  536.    prompt on the command line so you always know the active database.  
  537.  
  538.                     Light Bar Movement
  539.        Right Arrow  - right one file (wraps to next line)
  540.        Left  Arrow  - left one file  (wraps to previous line)
  541.        Up    Arrow  - up one row     (wraps to bottom line)
  542.        Down  Arrow  - down one row   (wraps to top line)
  543.        PgUp         - previous page  (if any)
  544.        PgDn         - next page      (if any)
  545.  
  546.   NOTE: in the lower right hand corner of the screen it shows 
  547.   that the current display is 1 of 3.  There are two more pages
  548.   of database files (use the PgUp and PgDn keys to access).
  549.  
  550.  Sample screen from the DIR command:
  551.  
  552.   ╔════════════════════════════ DATABASE FILES ════════════════════════════╗elp
  553.   ║ ADJ0      ADJ1      ADJ11212  ADJ2      ADJ3      ADJ4      ADJ5       ║
  554.   ║ ADJ6      ADJ66212  ADJ7      ADJ8      ADJA      ADJB      ADJC       ║
  555.   ║ ADJD      ADJI      ADJJ      ADJK      ADJL      ADJM      ADJN       ║
  556.   ║ ADJO      ADJP      ADJR      ADJS      ADJT      ADJU      ADJV       ║
  557.   ║ ADJW      ADJX      ADJY      ADJZ      BIGFIELD  CFS       CFS66102   ║
  558.   ║ CFSP      CFSPLUS   CFSTEST   CFS_LONG  FIV0      FIV1      FIV11212   ║
  559.   ║ FIV2      FIV3      FIV4      FIV5      FIV6      FIV66212  FIV7       ║
  560.   ║ FIV8      FIVA      FIVB      FIVC      FIVD      FIVI      FIVJ       ║
  561.   ║ FIVK      FIVL      FIVM      FIVN      FIVO      FIVP      FIVR       ║
  562.   ║ FIVS      FIVT      FIVU      FIVV      FIVW      FIVX      FIVY       ║
  563.   ║ FIVZ      FOU0      FOU1      FOU11212  FOU2      FOU3      FOU4       ║
  564.   ║ FOU5      FOU6      FOU66212  FOU7      FOU8      FOUA      FOUB       ║
  565.   ║ FOUC      FOUD      FOUI      FOUJ      FOUK      FOUL      FOUM       ║
  566.   ║ FOUN      FOUO      FOUP      FOUR      FOUS      FOUT      FOUU       ║
  567.   ║ FOUV      FOUW      FOUX      FOUY      FOUZ      MORE      ONE0       ║
  568.   ║ ONE1      ONE11212  ONE2      ONE3      ONE4      ONE5      ONE6       ║
  569.   ║ ONE66212  ONE7      ONE8      ONEA      ONEB      ONEC      ONED       ║
  570.   ║ ONEI      ONEJ      ONEK      ONEL      ONEM      ONEN      ONEO       ║
  571.   ║────────────────────────────────────────────────────────────────────────║
  572.   ║      Records :  9                                                      ║
  573.   ║  Last Update :  11/09/86                                               ║
  574.   ║       Fields :  12                                                     ║
  575.   ║  Record Size :  52                                         Page:1 of 3 ║
  576.   ╚════════════════════════════════════════════════════════════════════════╝
  577.  
  578. DIRECTORY INDEX
  579.  In the example below, CFSTEST.DBF was the active database.
  580.  I built some absurdly large indexes just to quickly demonstrate the output
  581.  of DQ.  The index CFS and CFSPLUS are similar except CFSPLUS is indexed on
  582.  a file with a field called FAST, while CFS is indexed on a file which 
  583.  doesn't contain that particular field.  At first glance it appears as if
  584.  the indexes would both work.  DQ finds the offending field even though it 
  585.  is embedded in a substr() function.
  586.  
  587.  NOTE: the asterisk before an index file name marks that index as a FoxBase 
  588.  index, i.e. it has the extension IDX instead of the NDX extension of dBASE.
  589.  
  590.  Partial sample screen from the DIR INDEX command showing an index that
  591.  doesn't match the active database: 
  592.  
  593.   CFSTEST is the active database and the light bar was positioned over the
  594.   index file CFSPLUS.  Notice how the index is displayed without splitting
  595.   any of the field names and that the offending field name was found even
  596.   though it was within a substr() function.  If by any chance you have an
  597.   index that approaches 200 characters, the bottom line may end with a
  598.   question mark.  This signifies that there is a small amount of the
  599.   index remaining that wouldn't fit in the alloted display space.  It would
  600.   also probably be the slowest dBASE application ever written.
  601.   ╔═════════════════════════════ INDEX FILES ══════════════════════════════╗
  602.   ║ ADJ0      CFS       CFSPLUS   FIV0      FOU0     *LAST      NAME       ║
  603.   ║ ONE0      ROUTE     SEV0      SIX0     *TEST      THR0      TWO0       ║
  604.   ║*USER                                                                   ║
  605.   ║────────────────────────────────────────────────────────────────────────║
  606.   ║ ONE+TWO+THREE+LEFT(FOUR,1)+RIGHT(FIVE,1)+SIX+SEVEN+EIGHT               ║
  607.   ║ +SUBSTR(FIRST,1,2)+NEW_PRIM+LEFT(OLD_PRIM,2)+SUBSTR(FAST,2,10)         ║
  608.   ║ +EIGHTEEN                                                              ║
  609.   ║ Not a CFSTEST index. Field FAST is not in CFSTEST          Page:1 of 1 ║
  610.   ╚════════════════════════════════════════════════════════════════════════╝
  611.  
  612.  
  613.   Partial sample screen from the DIR INDEX command showing an index that
  614.   does match the active database: 
  615.  
  616.   CFSTEST is the active database and the light bar was positioned over the
  617.   index file CFS. 
  618.   ╔═════════════════════════════ INDEX FILES ══════════════════════════════╗
  619.   ║ ADJ0      CFS       CFSPLUS   FIV0      FOU0     *LAST      NAME       ║
  620.   ║ ONE0      ROUTE     SEV0      SIX0     *TEST      THR0      TWO0       ║
  621.   ║*USER                                                                   ║
  622.   ║────────────────────────────────────────────────────────────────────────║
  623.   ║ ONE+TWO+THREE+SUBSTR(FOUR,2,3)+RIGHT(SIX,1)+SEVEN+EIGHT+NINE+TEN       ║
  624.   ║ +ELEVEN+TWELVE+THIRTEEN+FOURTEEN+FIFTEEN+SIXTEEN+SEVENTEEN+EIGHTEEN    ║
  625.   ║                                                                        ║
  626.   ║ Possible index for CFSTEST                                 Page:1 of 1 ║
  627.   ╚════════════════════════════════════════════════════════════════════════╝
  628.  
  629. FIELDS
  630.  
  631.   Sample screen for the FIELDS command.  All the fields are displayed
  632.   with their type, size, and decimal places.  If there are more than 66
  633.   fields, when you press a key the remaining fields will be displayed.
  634.  
  635.    Field types are : 
  636.            C = Character
  637.            N = Numeric
  638.            L = Logical
  639.  
  640. ╔══════════════════════════════════ FIELDS ══════════════════════════════════╗
  641. ║    Field      T  Size D     Field      T  Size D     Field      T  Size D  ║
  642. ║  1 LAST       C    20 0  23 THREE      C     2 0  45 T25        C     1 0  ║
  643. ║  2 FIRST      C    13 0  24 FOUR       C     3 0  46 F46        C     1 0  ║
  644. ║  3 NEW_PRIM   C    32 0  25 FIVE       C     2 0  47 F47        C     1 0  ║
  645. ║  4 OLD_PRIM   C    26 0  26 SIX        C     2 0  48 F48        N     1 0  ║
  646. ║  5 CODE       C     6 0  27 SEVEN      C     2 0  49 F49        L     1 0  ║
  647. ║  6 CITY       C    13 0  28 EIGHT      C     1 0  50 F50        N     1 0  ║
  648. ║  7 STATE      C     2 0  29 NINE       C     1 0  51 F51        N     1 0  ║
  649. ║  8 ZIP        C     5 0  30 TEN        C     1 0  52 F52        N     3 1  ║
  650. ║  9 PLUS4      C     4 0  31 ELEVEN     C     1 0                           ║
  651. ║ 10 USER       C     2 0  32 TWELVE     C     1 0                           ║
  652. ║ 11 FOREIGN    L     1 0  33 THIRTEEN   C     1 0                           ║
  653. ║ 12 DNF        C     1 0  34 FOURTEEN   C     1 0                           ║
  654. ║ 13 LOCAL      L     1 0  35 FIFTEEN    C     1 0                           ║
  655. ║ 14 INDIV      L     1 0  36 SIXTEEN    C     1 0                           ║
  656. ║ 15 TEMP       L     1 0  37 SEVENTEEN  C     1 0                           ║
  657. ║ 16 MILITARY   L     1 0  38 EIGHTEEN   C     1 0                           ║
  658. ║ 17 FORTH      L     1 0  39 NINETEEN   C     1 0                           ║
  659. ║ 18 E_DATE     D     8 0  40 TWENTY     C     1 0                           ║
  660. ║ 19 T_DATE     D     8 0  41 TWENTYONE  C     1 0                           ║
  661. ║ 20 UNIQUE     C     3 0  42 TWENTYTWO  C     1 0                           ║
  662. ║ 21 ONE        C     2 0  43 TWENEYTHRE C     1 0                           ║
  663. ║ 22 TWO        C     2 0  44 T24        C     1 0                           ║
  664. ╚═══════════════════════════ Press a Key ════════════════════════════════════╝
  665.  
  666. GOTO
  667.   Syntax: GOTO <record number>
  668.  
  669.        Go to record number and display the record.
  670.        Examples:
  671.           To go to the top record,  GO 1. 
  672.           To go to the last record, GO <number of records>.
  673.  
  674. HELP
  675.   Syntax: HELP [command]
  676.  
  677.        If you enter HELP alone, you will be given a light bar menu with all
  678.        the commands.  Simply place the light bar over any command and press
  679.        RETURN to get the full command explanation, usually with examples.
  680.        You can go directly to the help screen for a command by simply
  681.        entering HELP followed by the command, or its abbreviation.
  682.        Examples:  HELP SUM
  683.                      or
  684.                   he co
  685.  
  686.        Pressing F1 while at the command line prompt will give you
  687.        an overview help screen.  Pressing F1 while viewing a directory
  688.        will give you help about selecting files from a directory.
  689.  
  690. LOCATE
  691.   Syntax: LOCATE [FOR] [NOT] <field> [=, >, < , >=, <=] value 
  692.  
  693.        Locate next occurance, or non-occarance of value in field.
  694.        Values containing spaces should be surrounded by quotes.
  695.        Examples:  LO NOT CITY "OVERLAND PARK"
  696.                   LO ST KS
  697.                   LOCAT FOR NOT ZIPCODE 66212
  698.                   LOC ZIPCODE = "66212"
  699.                   locate for name "Richard Dower"
  700.                   LO SALARY >= 50000
  701.                   lo for taxes < 100.50
  702.                   lo left(depart,3) MIS
  703.                   lo not right(zip,3) 215
  704.                   lo substr(address,5,6) "OAK ST"
  705.  
  706.        Note: the >, <, >=, and <= are for numeric fields only.
  707.  
  708. NEXT
  709.       Find next match for previous LOCATE command.
  710.  
  711.       If a LOCATE or NEXT fails to find a match, a message will be
  712.       displayed indicating the end of file was reached with no
  713.       matches found.
  714.  
  715. QUIT 
  716.  
  717.      Close all files and exit from DQ.
  718.  
  719. RELATE
  720.   Syntax: RELATE <field1> <field2>
  721.  
  722.       Relates two databases on a common field.  
  723.       Rules:
  724.         1. <field1> is a character field in the database in work area 1.
  725.         2. <field2> is a character field in the database in work area 2.
  726.         3. <field1> and <field2> are the same length.
  727.         4. WORK AREA 1 must be the currently selected work area.
  728.  
  729.       Once the two files are RELATEd, any movement in the file in work area 1
  730.       will cause DQ to search in work area 2 for a record where field2 
  731.       matches the field1 in area 1.   If there is no corresponding record in
  732.       area 2, the bottom right of the area 2 window will display "NO MATCH".
  733.       This display is in split screen only.  When the screen is not split,
  734.       the relation is still active behind the sceens.  
  735.  
  736.       When you select WORK AREA 2 the relation is temporarily turned off.
  737.       When you select WORK AREA 1 again, the records are syncronized again.
  738.       To turn off the relation, either USE another file in either work area
  739.       or enter RELATE with no field names.
  740.  
  741.       Example:  You have a PAYROLL database with only Social Security Numbers
  742.           to identify the information.  You wish to know which record goes
  743.           with which employee.  Your EMPLOYEE database also has a Social 
  744.           Security Number field.  You could write a dBASE program and 
  745.           do the following:
  746.             SELECT 1
  747.             USE PAYROLL
  748.             INDEX ON SSN TO PSSN
  749.             SELECT 2
  750.             USE EMPLOYEE 
  751.             INDEX ON SSN TO ESSN
  752.             SELECT 1
  753.             SET RELATION TO SSN INTO EMPLOYEE
  754.           Now the two files will be syncronized. To view both records 
  755.           simultaneously would require considerable programming and using
  756.           @ SAY commands to format the screen. 
  757.  
  758.           In DQ you don't need indexes. Simply:
  759.  
  760.           Select WORK AREA 1       (F3)
  761.           USE PAYROLL
  762.           Select WORK AREA 2       (F3)
  763.           USE EMPLOYEE
  764.           Select WORK AREA 1 again (F3)
  765.           RE SSN SSN
  766.           This relates the SSN field in PAYROLL to SSN in EMPLOYEE.
  767.           Now any movement in the PAYROLL file will cause DQ to find the
  768.           matching SSN in the EMPLOYEE file.  If the screen is split (F4),
  769.           you may view both records at the same time.  You may also use
  770.           F2 to display any set of fields in either database.
  771.  
  772. RELATE continued...
  773.  
  774.   Sample screen for the RELATE command.
  775.   The files TEST.DBF and TEST2.DBF have been related on fields KEY and KEY2.
  776.   You will not that these two fields match in the two databases.  Whenever
  777.   you move within area 1 (TEST.DBF) the record in area 2 (TEST2.DBF) will
  778.   be found that matches the related field in area 1.  If there is no match,
  779.   the lower right corner of area 2 will display "NO MATCH".
  780.  
  781. ┌─────────────────TEST─────────────────┐┌─────────────────TEST2────────────────┐
  782. │  Number:     3 of    20              ││  Number:    20 of    20              │
  783. │NUMBER    :9999999.99:                ││NUMBER    :       .10:                │
  784. │INTEGER   :9999:                      ││INTEGER   :9999:                      │
  785. │LOGICAL   :T:                         ││LOGICAL   :T:                         │
  786. │DATE      :07/07/87:                  ││DATE      :08/08/81:                  │
  787. │STRING    :DOWER                    >>││STRING    :DOWER                    >>│
  788. │SMALL     :3:                         ││SMALL     :6:                         │
  789. │BIG       :3333333333333.33300:       ││BIG       :6666666666666.66600:       │
  790. │KEY       :XXX:                       ││KEY2      :XXX:                       │
  791. │NUMSTR    :273 :                      ││F9        : :                         │
  792. │F10       : :                         ││F10       : :                         │
  793. │F11       :W:                         ││F11       : :                         │
  794. │F12       : :                         ││F12       : :                         │
  795. │F13       : :                         ││F13       : :                         │
  796. │F14       : :                         ││F14       : :                         │
  797. │F15       : :                         ││F15       : :                         │
  798. │F16       : :                         ││F16       : :                         │
  799. │F17       : :                         ││F17       : :                         │
  800. │F18       : :                         ││F18       : :                         │
  801. │F19       : :                         ││F19       : :                         │
  802. │F20       : :                         ││F20       : :                         │
  803. │ F2 for more fields...       SELECTED ││ F2 for more fields...                │
  804. └──────────────────────────────────────┘└──────────────────────────────────────┘
  805.  
  806. SKIP 
  807.   Syntax: SKIP [NEXT] [-] <number> 
  808.  
  809.        Skip forward or back number records.
  810.        If you skip past the beginning of the file, you will be placed 
  811.        on record number 1.  If you skip past the end of the file, 
  812.        you will be positioned on the last record.
  813.  
  814.        Examples:
  815.           SKIP 10
  816.           SK -20
  817.  
  818.  
  819.  
  820. STATISTICS 
  821.  
  822.        Displays the record size, header size, and number of fields 
  823.        for the currenly opened database.
  824.  
  825. SUM
  826.   Syntax: SUM field [ [FOR] [NOT] <field> [=,>,<,>=,<=] value ]
  827.  
  828.        The number of records the SUM was derived from will
  829.        be displayed as well as the average, maximum and minimum.
  830.        Values containing spaces should be surrounded by quotes.
  831.        Examples:  SUM salary FOR POSITION = MANAGER
  832.                   SUM salary
  833.                   SUM allowance FOR NOT ZIPCODE = 66212
  834.                   SUM fica CITY "OVERLAND PARK"
  835.                   SUM regist PROGRAM DQ
  836.                   sum salary salary > 0
  837.                   sum salary for taxes >= 5000.50
  838.                   sum val(numstr)
  839.                   sum val(numstr) hiredate > 03/05/89
  840.                   sum salary left(code,3) MIS
  841.                   SUM withdraw right(zip,3) 215
  842.                   sum deposit for not substr(state,4,5) "TH CA"
  843.        Note: the >, <, >=, and <= are for numeric fields only.
  844.  
  845.     Sum always starts from, and includes, the current record in its
  846.     output.  If you wish to SUM an entire database, be sure you start
  847.     at record number 1.
  848.  
  849. SUM  continued...
  850.  
  851.     Sample screen illustrating the SUM command.
  852.     The active database is TEST.
  853.     NOTE: the output of SUM is adjusted to reflect the size of the
  854.     field being SUMed.  The output of the first example shows a field
  855.     definition of width 19 and decimal places 5. (19 is the maximum
  856.     field width allowed).  The second example shows the output of SUM
  857.     on a field with width 1 and no decimals.  By dynamically adjusting
  858.     the output, your answers will be in the format of the original field.
  859.  
  860. EXAMPLE 1:
  861.  
  862.   Record Number:     1 of     6                     Last Update: 04/05/89
  863. NUMBER     :    100.30:
  864. INTEGER    :  43:
  865. LOGICAL    :T:
  866. DATE       :09/09/88:
  867. STRING     :testi                                                             >>
  868. SMALL      :1:
  869. BIG        :1111111111111.11100:
  870.  
  871.  
  872.                     ┌────────────── SUM ───────────────┐
  873.                     │                                  │
  874.                     │   Count: 6                       │
  875.                     │     Sum:  23333333333333.33000   │
  876.                     │ Average:   3888888888888.88800   │
  877.                     │ Maximum:   6666666666666.66600   │
  878.                     │ Minimum:      9999999999.00000   │
  879.                     │                                  │
  880.                     │ DONE-Hit a Key                   │
  881.                     └──────────────────────────────────┘
  882.  
  883.  
  884. TEST>sum big
  885.  
  886. SUM  continued...
  887.  
  888. EXAMPLE 2:
  889. Sample screen illustrating the SUM command using a condition.
  890. NOTE: only 3 records matched the condition so the average reflects
  891. the sum divided by 3.  
  892. The active database is TEST.
  893.  
  894.   Record Number:     1 of     6                          Last Update: 04/05/89
  895. NUMBER     :    100.30:
  896. INTEGER    :  43:
  897. LOGICAL    :T:
  898. DATE       :09/09/88:
  899. STRING     :testi                                                             >>
  900. SMALL      :1:
  901. BIG        :1111111111111.11100:
  902.  
  903.  
  904.                     ┌───── SUM ──────┐
  905.                     │                │
  906.                     │   Count: 3     │
  907.                     │     Sum:   6   │
  908.                     │ Average:   2   │
  909.                     │ Maximum:   3   │
  910.                     │ Minimum:   1   │
  911.                     │                │
  912.                     │ DONE-Hit a Key │
  913.                     └────────────────┘
  914.  
  915.  
  916.  
  917. TEST>sum small date > 07/08/84
  918.  
  919.  
  920.  
  921.  
  922. USE
  923.   Syntax: USE [path]<database file> 
  924.  
  925.        Opens a database file.  
  926.        The first record in the database will be displayed.
  927.        If there are more than a screen full of fields, F2 will
  928.        page through the other fields.
  929.  
  930.        USE allows you to open databases in other directories
  931.        while the DIR command only looks in the current directory.
  932.  
  933.     Examples: USE TEST
  934.               USE D:\FOX\ACCOUNTING\ACTIVITY
  935.  
  936. FUNCTIONS:
  937.  
  938.   The functions supported by DQ are designed to be used one at a time and
  939.   only with selected commands.  When using a function, do not have any
  940.   embedded spaces.
  941.      Example:      RIGHT           WRONG
  942.                 val(month)      left (code,3)
  943.                 left(code,3)    left( code,3)
  944.                 right(key,4)    left(code, 3)
  945.                                 val(left(salary,2))
  946.  
  947.   LEFT(field,n)  - returns a string that is the first n characters in field.
  948.   RIGHT(field,n) - returns a string that is the last n characters in field.
  949.   SUBSTR(field, start,n) - returns a string that starts at location "start" 
  950.                            in field and is n characters long.
  951.  
  952.   Commands which allow LEFT(), RIGHT() and SUBSTR():
  953.     LOCATE
  954.     COUNT
  955.     SUM (only for the conditional portion)  
  956.          Examples:
  957.               SUM NUMBER SUBSTR(NAME,3,2) WE
  958.               SUM VAL(NUMSTR) RIGHT(ZIP,2) 15
  959.               SUM SALARY FOR LEFT(TITLE,7) = MANAGER
  960.  
  961.     Note: RELATE does not yet support relations built on substrings.
  962.  
  963.       Examples:
  964.           LO  LEFT(NAME,5) DOWER
  965.           CO  RIGHT(ZIP,2) 15
  966.           LOCATE FOR LEFT(CITY,8) = "NEW YORK"
  967.           coun right(key,3) "XYZ"
  968.           lo substr(state,6,5) CAROLINA
  969.           lo substr(state,4,5) "TH DA"
  970.  
  971.   VAL(field)         - returns the numeric equivelent of a character field.
  972.                        Used to sum numeric data stored in character fields.
  973.  
  974.   Commands which allow VAL():
  975.     SUM
  976.  
  977.       Examples:
  978.           SUM VAL(SALARY)
  979.           SU  VAL(deposit)
  980.           sum val(withdraw) for usedate > 01/09/88
  981.           sum val(withdraw) right(zip,2) 15
  982.  
  983. Some tests to help you get started.  If you play with the following 
  984. commands on the sample databases, you will quickly find the speed
  985. and power of DQ.
  986.  
  987. Include with the documentation are a few sample files.
  988.  
  989.   TEST.DBF  - contains several numeric fields of different formats,
  990.               a date field, many character fields, and several logical
  991.               fields.
  992.               BIG is the largest width possible for a dBASE numeric field.
  993.               SMALL, which is the smallest width possible for a numeric field.
  994.               STRING is the longest possible character field.
  995.               KEY is a 3 digit character field used to demonstrate the 
  996.                   RELATE command.  The file TEST2 has a corresponding
  997.                   field called KEY2.
  998.               NUMSTR is a field of numeric data stored in a character
  999.                   field to demonstrate the VAL() function.
  1000.               TEST also has 128 fields, the most allowed by dBASE.
  1001.               Some interesting tests to run on TEST are:
  1002.                 SUM BIG
  1003.                 SUM SMALL
  1004.                 SUM BIG LOGICAL
  1005.                    Sums only the records where LOGICAL is .T.
  1006.                 SUM BIG NOT LOGICAL
  1007.                    Sums only the records where LOGICAL is .F.
  1008.                 SUM FIELD128 date > 01/01/87
  1009.                 FIELDS
  1010.                    Shows the definition of all 128 fields.
  1011.                 CO INTEGER > 200
  1012.                 LO INTEGER < 200
  1013.                 NEXT
  1014.                    
  1015.               Now use some functions:
  1016.                 SUM VAL(NUMSTR)
  1017.                 LO LEFT(STRING,3) dow
  1018.                 CO RIGHT(NUMSTR,2) 75
  1019.                 sum val(numstr) substr(string,3,3) wer
  1020.  
  1021.  
  1022.   To demonstrate the different work areas and the RELATE command:
  1023.          Press F3 until you have selected WORK AREA 1.
  1024.          USE TEST
  1025.          Press F3 again to select WORK AREA 2.
  1026.          USE TEST2
  1027.          Press F3 a few times and between presses move around within
  1028.          each of the files, use the SUM command, etc.
  1029.          Press F4 to split the screen.  Now you can see both files
  1030.          and the bottom of the screen tells which one is the SELECTED
  1031.          database.  Press F3 several times to see how the screen is 
  1032.          updated.  Now perform several operations on each and see how
  1033.          each record is displayed in the split screen mode.
  1034.  
  1035.          Select WORK AREA 1.
  1036.          RELATE KEY KEY2
  1037.          This will relate the field KEY in TEST to the field KEY2 in TEST2.
  1038.          If there is no corresponding match in TEST2, a message will show
  1039.          at the bottom right of the WORK AREA 2 screen (split screen only).
  1040.          Now move within TEST using the PgUp, PgDn, Ctrl+Home, and Ctrl+End
  1041.          keys.  Also try LOCATE, GOTO, and SKIP.  You will notice how nicely
  1042.          the records are matched between TEST and TEST2.  You may also press
  1043.          F2 to display a different set of fields in either work area and 
  1044.          the records will continue to match up.  If you unsplit the screen
  1045.          by pressing F4, the records will still match.  You can see this
  1046.          by pressing F3 and checking work area 2.
  1047.          Whenever you select WORK AREA 2, the relation is temporarily
  1048.          turned off.  When you select WORK AREA 1 again, the records will
  1049.          be syncronized again.
  1050.          Either USE another file or enter RELATE without any field names
  1051.          to turn off the relation.
  1052.  
  1053.   The following index files have been included to demonstrate DQ's ability
  1054.   to determine index types and which fields are not in the open database.
  1055.  
  1056.   TEST.NDX  - index file which matches TEST but not TEST2.
  1057.   TEST.IDX  - FoxBase index file which matches both TEST and TEST2.
  1058.   TEST2.DBF - similar to TEST but with one field different.
  1059.   TEST2.IDX - FoxBase index which matches TEST2 but not TEST.
  1060.  
  1061. To show how DQ handles index information, USE TEST.  Now, enter the
  1062. command DIR INDEX.  Move the light bar over each of the indexes and
  1063. not the information displayed at the bottom of the window.  Now,
  1064. USE TEST2 and move the light bar around again.  Note how DQ matches
  1065. the file with its corresponding index files and lets you know which
  1066. field is not in the database if the index file is not a match.
  1067.  
  1068.    
  1069.      
  1070.