home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / btvw120a.zip / BTVIEWER.DOC < prev    next >
Text File  |  1992-12-08  |  70KB  |  1,776 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                     BTVIEWER
  10.  
  11.  
  12.                   A Btrieve file Query and Reporting Utility
  13.                                   Version 1.20A
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.                                         By
  34.  
  35.                               Access Microsystems Inc.
  36.                                 404 Midstreams Road
  37.                                Brick, NJ  08724-3838
  38.  
  39.                                   (908) 892-2683
  40.                                   CIS: 74040,607
  41.  
  42.  
  43.  
  44.  
  45.  
  46.                                  TABLE OF CONTENTS
  47.  
  48.      1.  Who made BTVIEWER?  Why?
  49.  
  50.      2.  What does BTVIEWER require?
  51.  
  52.      3.  What does BTVIEWER do?
  53.  
  54.         A. Intended actions
  55.         B. Unintended actions (dare we say BUGS?)
  56.  
  57.      4.  Details...
  58.  
  59.         A. Starting BTVIEWER
  60.         B. The Main Menu
  61.         C. The File Sub-menu
  62.  
  63.                 1. Cloning a Btrieve file
  64.                 2. Packing a Btrieve file
  65.                 3. Copying a Btrieve file
  66.                 4. Test/Rebuild a Btrieve file
  67.                 5. Misc. Btrieve Functions
  68.  
  69.                         a. Set Owner
  70.                         b. Clear Owner
  71.                         c. Statistics
  72.                         d. Btrieve Version
  73.                         e. Create file from BTB file
  74.                         f. Supplemental Index
  75.                         g. Transactions
  76.  
  77.                 8. Exiting BTVIEWER
  78.  
  79.         D. The View Sub-menu
  80.  
  81.                 1. File
  82.                 2. Field
  83.  
  84.                         a. Add Fields
  85.                         b. Delete Fields
  86.                         c. Clear Fields
  87.                         d. Define Summary
  88.                         e. Print/Display Summary
  89.                         f. Joins
  90.  
  91.                 3. Restrict
  92.  
  93.                         a. Add/Edit Restrictions
  94.                         b. Clear Restrictions
  95.  
  96.                 4. Sort
  97.                 5. Display/Edit
  98.                 6. Print
  99.                 7. Import/Export
  100.  
  101.                         a. Import View
  102.                         b. Export View
  103.  
  104.                 8. Modify All in View
  105.  
  106.                         a. Modify All
  107.                         b. Delete All
  108.  
  109.                 9. Save/Load View
  110.  
  111.                         a. Save current View
  112.                         b. Load View
  113.  
  114.         E. The Options Sub-menu
  115.  
  116.                 1. Set Colors
  117.                 2. Set Misc. Parameters
  118.                 3. Reset Btrieve
  119.                 4. REGISTER BTVIEWER
  120.  
  121.         H. The Help Sub-menu
  122.  
  123.                 1. List Error Codes
  124.                 2. List Operation Codes
  125.                 3. Btrieve Page Size Calculator
  126.                 4. About BTVIEWER
  127.  
  128.      5.  Getting help/making suggestions/future directions
  129.  
  130.  
  131.  
  132. 1.  Who made BTVIEWER?  Why?
  133.  
  134.      BTVIEWER is a product of Access Microsystems Inc.  We do
  135.      programming in C and C++ under DOS and UNIX, often
  136.      using Btrieve as a file manager.  (If you have a
  137.      project we might be able to help with, contact us at
  138.      the phone or Compuserve number on the first page of the
  139.      documentation or throughout the software.)
  140.  
  141.      We have used several programs for looking at,
  142.      recovering data from, and editing Btrieve files.  We
  143.      have been disappointed by the results.  Some crashed,
  144.      others worked but punished us in the process.  We
  145.      thought that there must be a better way, and set out to
  146.      design such a product.  BTFILER was our first attempt at
  147.      such a program.  It remains a popular product, and has
  148.      become a very competent Btrieve File Recovery and
  149.      Maintenance tool, with recovery options for the most
  150.      damaged Btrieve files.  BTFILER has a registration price of
  151.      $29.00 (+4.00 S&H) and is available from Access
  152.      Microsystems Inc.
  153.  
  154.      BTVIEWER is a more sophisticated tool for viewing and
  155.      querying Btrieve files that have .DDF description files.
  156.      While the HEX Edit bit twidling done by BTFILER is
  157.      sometimes useful, it is often useful to look at and
  158.      minipulate the data in Btrieve files in other ways.
  159.  
  160.      If BTVIEWER meets a need, please register!  Also, think
  161.      about the possibility of getting a distribution license
  162.      and making BTVIEWER part of your Btrieve application.
  163.  
  164.  
  165.      DISCLAIMER - AGREEMENT
  166.  
  167.      Users of BTVIEWER must accept this disclaimer of
  168.      warranty:
  169.  
  170.      "BTVIEWER is supplied as is.  The author disclaims all
  171.      warranties, expressed or implied, including, without
  172.      limitation, the warranties of merchantability and of
  173.      fitness for any purpose. The author assumes no
  174.      liability for damages, direct or consequential, which
  175.      may result from the use of BTVIEWER."
  176.  
  177.      For Non-Registered Users:
  178.  
  179.      BTVIEWER is a "shareware program" and is provided at no
  180.      charge to the user for evaluation.  Feel free to share
  181.      it with your friends, but please do not give it away
  182.      altered or as part of another system.  The essence of
  183.      "user-supported" software is to provide personal
  184.      computer users with quality software without
  185.      high prices, and yet to provide incentive for
  186.      programmers to continue to develop new products.  If
  187.      you find this program useful and find that you are
  188.      using BTVIEWER and continue to use BTVIEWER after a
  189.      reasonable trial period, you must make a registration
  190.      payment of $79.00 (+4.00 S&H) to Access Microsystems Inc.
  191.      The $79.00 registration fee will license one copy for use
  192.      on any one computer at any one time.  You must treat
  193.      this software just like a book.  An example is that this
  194.      software may be used by any number of people and may be
  195.      freely moved from one computer location to another, so
  196.      long as there is no possibility of it being used at one
  197.      location while it's being used at another.  Just as a
  198.      book cannot be read by two different persons at the same
  199.      time, a single copy of BTVIEWER cannot be used in two places
  200.      at once, unless the license is being violated.
  201.  
  202.      Commercial users of BTVIEWER must register and pay for
  203.      their copies of BTVIEWER within 30 days of first use or
  204.      their license is withdrawn.  Site-License arrangements
  205.      may be made by contacting Access Microsystems Inc. or
  206.      by filling out the registration form found in
  207.      REGISTER.DOC or produced by BTVIEWER.  See the
  208.      Options/Register BTVIEWER menu option.
  209.  
  210.      You are encouraged to pass a copy of BTVIEWER along to
  211.      your friends for evaluation.  Please encourage them to
  212.      register their copy if they find that they can use it.
  213.      All registered users will receive:
  214.  
  215.           A copy of the latest version of the BTVIEWER
  216.              system.
  217.           A printed manual.
  218.           Notice of future upgrades.
  219.           Information on future products.
  220.           Support for a MINIMUM of 90 days.
  221.           A copy of our BU partial BUTIL replacement
  222.              program.  This program STOPs, RESETs Btrieve,
  223.              shows BTRIEVE version and CLONEs Btrieve files.
  224.              You may distribute this freely.
  225.  
  226.  
  227. 2.  What does BTVIEWER require?
  228.  
  229.         BTVIEWER requires:
  230.  
  231.           An IBM PC or compatible with 512 K (640K
  232.           recommended for large variable length records).
  233.  
  234.           MS/PC DOS version 2.0 or better.  Version 4.00 is
  235.           a known problem, so if you have a problem and you
  236.           have version 4.00 of MS/PC DOS, UPGRADE DOS FIRST!
  237.  
  238.           Btrieve version 4.11 or better.  Make sure to
  239.           tailor your Btrieve start-up parameters (See "Set
  240.           Misc. Parameters" in the File Sub-menu).
  241.  
  242.           .DDF Files containing file layouts for your Btrieve
  243.           files.  We currently do not offer a .DDF
  244.           Creation/Editing tool, but we are working on it.
  245.  
  246.           BTVIEWER also requires and is shipped with the
  247.           following files:
  248.  
  249.                         BTVIEWER.DOC    This file
  250.  
  251.                         BTVIEWER.BER    A file with Btrieve Error
  252.                                           codes listed
  253.  
  254.                         BTVIEWER.BOP    A file with Btrieve Operation
  255.                                           codes
  256.  
  257.                         BTVIEWER.MNU    A Menu Control File
  258.  
  259.                         BTVIEWER.HLP    A Help file.
  260.  
  261.                         BTVIEWER.MSK    Formatting information -
  262.                                           PROPRIETARY FORMAT!
  263.  
  264.                         BTVIEWER.CF1    A configuration file
  265.  
  266.                         BTVIEWER.EXE    The executable file.  Run this
  267.                                        to use BTVIEWER.
  268.  
  269.                         REGISTER.DOC   A file with a BTVIEWER registration
  270.                                           form.  (Registration can be
  271.                                           printed by the program itself
  272.                                           as well.)
  273.  
  274.                         AMIMAP.EXE     A BONUS utility program that
  275.                                           lists the amount of memory
  276.                                           taken up by resident
  277.                                           programs like Btrieve
  278.  
  279.                         SAMPLE.BTB     A sample BTrieve Build ASCII
  280.                                           file, used to create Btrieve
  281.                                           Files (File/Misc. Btrieve
  282.                                           Functions/Create file from BTB).
  283.  
  284.                         SAMPLE.BTS     A sample BTrieve Supplemental
  285.                                           index ASCII file, used to
  286.                                           create a Supplemental Index.
  287.  
  288.                         FILE.DDF
  289.                         FIELD.DDF
  290.                         INDEX.DDF     Data Description files for the sample
  291.                                           file CUSTS.DAT
  292.  
  293.                         CUSTS.DAT     Sample Customer file to try things
  294.                                           out on.
  295.  
  296.                         REGISTER.DOC  A file containing a
  297.                                           registration form.
  298.  
  299.                         CINSTALL.DAT   A Color configuration file.
  300.                             This file contains a single line of text.
  301.                             The line has 7 sets of 3 digit numbers, each
  302.                             3 digit number representing one of the types
  303.                             of colors used by BTVIEWER.  THIS FILE
  304.                             SHOULD BE PLACED IN A DIRECTORY THAT IS
  305.                             ON YOUR DOS PATH SO THAT YOU WILL ALWAYS
  306.                             READ THE SAME COLOR FILE!  The file should
  307.                             look like this:
  308.  
  309.                                 rrrmmmooodddsssbbbnnn
  310.  
  311.                                 Where:
  312.  
  313.                                 rrr=decimal "regular" color.
  314.                                 mmm=decimal "menu" color.
  315.                                 ooo=decimal "selected menu option"
  316.                                             color.
  317.                                 ddd=decimal "active data entry field"
  318.                                             color.
  319.                                 aaa=decimal "status line" color.
  320.                                 bbb=decimal "box" color.
  321.                                 nnn="Hot" letter in menu option
  322.  
  323.                 BTVIEWER may, from time to time, create the
  324.                 following files:
  325.  
  326.                        BTVIEWER.CF2    A second configuration file.
  327.  
  328.                        TMP?????.$$$   Temporary files created to
  329.                        save the state of the screen, etc. These may
  330.                        be deleted if you are SURE that no copy of
  331.                        BTVIEWER is running on the system or on a
  332.                        network the system is connected to.
  333.  
  334.  
  335. 3.  What does BTVIEWER do?
  336.  
  337.         A. Intended actions
  338.  
  339.           BTFIEWER allows you to create, save and restore
  340.           "views" of your data.  "Views" include a file, a set
  341.           of fields, a sorting order, and a set of restrictions.
  342.           Data is viewed and exited in a convenient format
  343.           (dates like 06/17/1992, binary numbers presented like
  344.           123.45, etc.).  You also may edit fields in a HEX
  345.           format as an option.
  346.  
  347.           BTVIEWER allows you to JOIN two files based upon a
  348.           field in a primary file and an index in a secondary
  349.           file, including all records, all records with a match in
  350.           the secondary file, or all records without a match in
  351.           the secondary file.
  352.  
  353.           BTVIEWER allows you to restrict your "view" of a file
  354.           using a "query by form" screen.  You may also
  355.           modify all records in the view with a "modify by
  356.           example" screen, or delete all records in a view.
  357.  
  358.           BTVIEWER allows you to generate summary information
  359.           (MIN, MAX, SUM, AVG) and allows a calculated field,
  360.           that is, a field in a view that is calculated from
  361.           constants and other fields.
  362.  
  363.           BTVIEWER allows you to RECOVER data from damaged
  364.           Btrieve files.  BTFILER, our Btrieve File Maintenance
  365.           and Recovery Utility offers more complete file
  366.           rebuilding, so consider it if you have severe data
  367.           corruption problems.
  368.  
  369.           BTVIEWER allows you to Clone a Btrieve file (That
  370.           is, create an empty Btrieve file with the same key
  371.           structure and record size as the original).
  372.  
  373.           BTVIEWER allows you to Pack a Btrieve file (That
  374.           is, create a copy of a Btrieve file less the space
  375.           left by deleted records) as well as Copy a file (That
  376.           is, copy records from one Btrieve fiole to another,
  377.           with the destination file possibly having a different
  378.           record length and key structure).
  379.  
  380.           BTVIEWER allows you to Import and Export records in
  381.           comma-delimited ASCII!  You may Export into dBASE III
  382.           compatible files.
  383.  
  384.           BTVIEWER allows you to create a Btrieve file with a
  385.           BTrieve Build file (.BTB) file and create a
  386.           supplemental index using a BTrieve Supplemental
  387.           (.BTS) file.  You may also DROP a supplemental
  388.           index.
  389.  
  390.           BTVIEWER allows you to begin and end transactions
  391.           within a single session, and will prompt you to
  392.           end the transaction if you try to do something
  393.           that can't be done in a transaction.
  394.  
  395.           BTVIEWER allows you to repeat repetitive tasks by
  396.           creating keystroke files that get passed back to
  397.           the keyboard buffer as the program is run.  This
  398.           also allows more technical users to provide easy
  399.           to use batch files for those less comfortable
  400.           operating BTVIEWER directly.  (See Appendix B).
  401.  
  402.           BTVIEWER allows you to Set and Clear owners of
  403.           Btrieve files, displays Btrieve version
  404.           information, and shows file statistics and key
  405.           structure.
  406.  
  407.           BTVIEWER lists Btrieve Error codes (arranged
  408.           numerically) and Operation codes (arranged
  409.           alphabetically).  You may also get details on
  410.           Btrieve error codes.
  411.  
  412.           BTVIEWER lets you choose from 4 different color
  413.           sets, or customize colors.
  414.  
  415.         B. Unintended actions (dare we say BUGS?)
  416.  
  417.           As of this writing date, there are no known bugs.
  418.           (Kind of reminds us of the compiler that reports,
  419.           after a successful compile, "None of the errors
  420.           were found").
  421.  
  422.           It is likely that VERY large variable length
  423.           records will cause problems with memory (but we
  424.           have not tested it with very large (>25K) variable
  425.           length records).  Please let us know if you run
  426.           across any problems.  See section 5, Getting
  427.           help/making suggestions.
  428.  
  429. 4.  Details...
  430.  
  431.      In the following sections, we detail actions required
  432.      to make BTVIEWER do work for you.  This assumes you have
  433.      placed the files mentioned above (What does BTVIEWER
  434.      require?) in your "PATH".
  435.  
  436.      For instance, if you type in PATH<Press ENTER> from the
  437.      DOS prompt (commonly "C:\>>") and you see the
  438.      following:
  439.  
  440.                 PATH=C:\;C:\DOS;C:\UTIL
  441.  
  442.      you should place the BTVIEWER file in the C:\, C:\DOS or
  443.      the C:\UTIL directory.  You must also have Btrieve
  444.      loaded, or if so configured, Btrieve or Brequest must
  445.      be available on the PATH.
  446.  
  447.      Your .DDF files and all data files must be in the current
  448.      working directory when BTVIEWER is started, or in a
  449.      directory pointed to by the BTFILEPATH environment
  450.      variable.  For example, if you have your .DDF files in
  451.      C:\DDFS and your data files in C:\DAT and D:\MOREDAT, you
  452.      would insert the following line into your AUTOEXEC.BAT:
  453.  
  454.         SET BTFILEPATH=C:\DDFS;C:\DAT;D:\MOREDAT;
  455.  
  456.      IMPORTANT NOTE:  Please begin working on the sample Btrieve
  457.      and .DDF files supplied with BTVIEWER.  BTVIEWER is a
  458.      powerful tool, but like most power tools, can have
  459.      undesired effects on the new user.
  460.  
  461.      A. Starting BTVIEWER
  462.  
  463.           At any DOS prompt (or from the directory that
  464.           BTVIEWER files reside in, if not on your PATH)
  465.           type:
  466.  
  467.                 BTVIEWER<Press ENTER>
  468.  
  469.           BTVIEWER will then take a few seconds to load.
  470.           Depending upon the settings on the "Set Misc.
  471.           Parameters" screen (under the "Options" menu)
  472.           BTVIEWER may also load Btrieve or Brequest.  If you
  473.           get a message indicating that BTVIEWER is unable to
  474.           load Btrieve, load Btrieve from the command line
  475.           and then go to the "Set Misc. Parameters" screen
  476.           and ensure that the default Btrieve start up
  477.           parameters are set correctly.
  478.  
  479.           Three command line parameters are possible.
  480.           /k:keyfile, where keyfile is the name of a file
  481.           with keystrokes for BTVIEWER to use on start-up.
  482.           See Appendix B for details on creation of a
  483.           keystroke file.  /c:myfile.cf2 where myfile.cf2 is
  484.           a version of the BTVIEWER.CF2 configuration file
  485.           created under Options/Set Misc. Parameters.  If
  486.           you need to, you can create 2 or more
  487.           configuration files, and with the /c command line
  488.           parameter, indicate which should be loaded.  A third
  489.           possible command line argument is /v:vufile.vu where
  490.           vufile.vu is a "view" file that contains information
  491.           on a particular set of File, Field, Sort and
  492.           Restrictions.  .VU files must be created within
  493.           BTVIEWER.
  494.  
  495.           As BTVIEWER is loaded a screen will appear briefly
  496.           to list the registered owner of this copy of
  497.           BTVIEWER (Thank You!) or to remind you that you are
  498.           currently using an unregistered copy.  This screen
  499.           will remain on the screen for a few seconds, and
  500.           then you may press any key to continue.  Note that
  501.           the status line (the bottom line on the screen)
  502.           will almost always tell you what BTVIEWER is doing
  503.           or what you should do next.
  504.  
  505.         B. The Main Menu
  506.  
  507.           The Main Menu is a menu bar running across the top
  508.           of the screen.  This menu has four options:
  509.           File, View, Options, and Help.
  510.  
  511.           You can maneuver around the menu by using arrow
  512.           keys and the ENTER key, as well as ALT-Letter
  513.           combinations. (For instance, if no sub-menu is
  514.           "dropped," you may press the ALT and the H key to
  515.           get to the Help sub-menu.
  516.  
  517.           To exit BTVIEWER, you can press ESC (or press ESC
  518.           twice if a sub-menu is "dropped") and you will
  519.           return to DOS. You may also exit by pressing ENTER
  520.           while the Exit option of the File sub-menu is
  521.           highlighted.
  522.  
  523.         C. The File Sub-menu
  524.  
  525.           The File sub-menu includes four options:
  526.           Browse/Edit Btrieve File, Clone Btrieve File, Pack
  527.           Btrieve File,and Exit.
  528.  
  529.           1. Cloning a Btrieve file
  530.  
  531.                With this option, you can make an empty copy
  532.                of an existing Btrieve file.  You must enter
  533.                the name of the Btrieve file as well as the
  534.                name of the "clone" file to be created.
  535.  
  536.           2. Packing a Btrieve file
  537.  
  538.                Like most DOS files, Btrieve files get bigger
  539.                as records are added, but do not shrink as
  540.                records are deleted.  This can be especially
  541.                noticeable if you have a transaction file
  542.                that grows and grows until some month or year
  543.                end procedure, and then is purged.  The space
  544.                where the deleted records were is still in
  545.                the file.  This space will eventually be used
  546.                again, but what if you can't wait?
  547.  
  548.                That is where Packing comes in.  Simply
  549.                supply the name of the file to be packed, and
  550.                BTVIEWER will rewrite it without the space
  551.                where the deleted records were.  The original
  552.                file is saved with an extension of .BAK.
  553.                Please ensure that the packed file is good
  554.                and then you may delete the .BAK.
  555.  
  556.           3. Copying a Btrieve file
  557.  
  558.                This operation allows you to copy data from one
  559.                btrieve file to another, possibly with different
  560.                key structure and record length.
  561.  
  562.  
  563.           4. Rebuild a Btrieve file
  564.  
  565.                This option allows you to rebuild a damaged file.
  566.  
  567.                If you don't normally read
  568.                documentation, PLEASE READ THIS!  This
  569.                is a "last resort" procedure that should
  570.                be used only if no recent backup exists.
  571.                While there is little chance of damage
  572.                occurring to your Btrieve file since the
  573.                original is opened in read-only mode,
  574.                and the original is saved as a .BAK
  575.                file, backups are the best bet!  There
  576.                is no guarantee that this procedure will
  577.                get all records, although it is likely
  578.                that almost all records will be
  579.                recovered.
  580.  
  581.                This procedure uses physical positioning
  582.                (not logical positioning, going through
  583.                the file via a key) to read from the
  584.                first physical record to the last.  If
  585.                an error occurs while proceeding from
  586.                beginning to end, the program tries to
  587.                step directly to the last record, and
  588.                tries to read from end to beginning.  If
  589.                there is only one record that has a
  590.                problem, all but that one record should
  591.                be recovered.
  592.  
  593.          5. Misc. Btrieve Functions
  594.  
  595.                   a. Set Owner
  596.  
  597.                     Btrieve allows users to set "owners" for
  598.                     files.  By setting an "owner," a Btrieve
  599.                     user can choose to allow no access to
  600.                     the file without the owner name or allow
  601.                     read-only access, and the user can
  602.                     choose whether the file will be
  603.                     encrypted or not.  It is important to
  604.                     remember that if you set an owner for a
  605.                     Btrieve file, any program that is to
  606.                     access it (including BTVIEWER) must know
  607.                     that user name, and the user must
  608.                     remember the user name if s/he wishes to
  609.                     Clear the owner (see below).
  610.  
  611.                     When the File/Misc. Btrieve
  612.                     Functions/Set Owner menu option is
  613.                     selected, BTVIEWER displays a box with
  614.                     three fields.  In the first field, enter
  615.                     the name of the file for which an owner
  616.                     name is to be set.  In the second field,
  617.                     enter the string that will become the
  618.                     new "owner."  In the third field you
  619.                     will be presented with a menu that will
  620.                     allow you to choose whether or not to
  621.                     allow read-only access without the owner
  622.                     name, and whether or not the Btrieve
  623.                     file should be encrypted.  Highlight the
  624.                     appropriate option and press ENTER.  If
  625.                     you have selected an option that calls
  626.                     for encryption, some time may be
  627.                     required.  Please be patient.
  628.  
  629.                   b. Clear owner
  630.  
  631.                     When the File/Misc. Btrieve
  632.                     Functions/Clear Owner menu option is
  633.                     selected, BTVIEWER displays a box with
  634.                     two fields.  In the first field, enter
  635.                     the name of the file for which an owner
  636.                     name is to be cleared.  In the second
  637.                     field, enter the current "owner."  If
  638.                     you have selected a Btrieve file that
  639.                     had an owner name set with encryption,
  640.                     some time may be required.  Please be
  641.                     patient.
  642.  
  643.                   c. Statistics
  644.  
  645.                     When the File/Misc. Btrieve
  646.                     Functions/Statistics menu option is
  647.                     selected, BTVIEWER prompts for a file
  648.                     name to be entered.  If the file name
  649.                     entered exists and is a valid Btrieve
  650.                     file, BTVIEWER will display information
  651.                     about the file, including the number of
  652.                     records and number of keys, the record
  653.                     length, the file length, and some
  654.                     information on the actual space used, on
  655.                     average, for each record in the file and
  656.                     the % utilization.  Information on the
  657.                     keys will appear in a box on the lower
  658.                     portion of the screen.  If more keys
  659.                     than will fit on one screen are present,
  660.                     use the arrow or page down keys to see
  661.                     the rest of the key information.
  662.  
  663.                   d. Btrieve Version
  664.  
  665.                     When the File/Misc. Btrieve
  666.                     Functions/Btrieve Version menu option is
  667.                     selected, BTVIEWER displays a small box
  668.                     that gives Btrieve version information,
  669.                     for instance "Btrieve Version 5.10 for
  670.                     Networks."  Press any key to continue.
  671.  
  672.                   e. Create file from BTB file
  673.  
  674.                      Select this option to create a new Btrieve file.
  675.                      You will need to supply the name of a
  676.                      BTrieve Build file (BTB) and a name for the
  677.                      new file.  This option is similar to  BUTIL's
  678.                      -CREATE option, but with much better error
  679.                      handling.  Please see the sample BTB file
  680.                      called SAMPLE.BTB provided with BTVIEWER
  681.                      system and listed in Appendix A.
  682.  
  683.                   f. Supplemental Index
  684.  
  685.                      Selecting this menu option will give you
  686.                      another menu, where you may create or
  687.                      drop a supplemental index.  You must
  688.                      have a .BTS file (see SAMPLE.BTS for a
  689.                      sample of the format).  Enter the .BTS
  690.                      file name in the first field, and the
  691.                      name of the Btrieve file to add the
  692.                      supplemental index to in the next.
  693.  
  694.                      If you choose to drop a supplemental
  695.                      index, you will be asked to supply the
  696.                      Btrieve file name and the index number
  697.                      to drop.  Use File/Misc. Btrieve
  698.                      Functions/Statistics to determine the
  699.                      key number to drop.
  700.  
  701.                   g. Transactions
  702.  
  703.                      You may begin a transaction, or if one
  704.                      is already in progress, end a
  705.                      transaction using this menu option.
  706.                      When ending a transaction, you may
  707.                      choose to simply end the transaction
  708.                      (changes saved) or you may abandon the
  709.                      transaction (changes lost).
  710.  
  711.          6. Exiting BTVIEWER
  712.  
  713.                Choose this option to exit BTVIEWER and return
  714.                to DOS.  You may also exit by pressing ESC
  715.                (or by pressing ESC twice if you are in the
  716.                File, Options, or Help sub-menu).
  717.  
  718.         D. The View Sub-menu
  719.  
  720.                The file sub-menu (explained previously) contains
  721.                many different utility functions, but the View
  722.                sub-menu is the heart of BTVIEWER and where you
  723.                will spend the bulk of your time using BTVIEWER.
  724.  
  725.                Lets look at what you can do with BTVIEWER.  Lets
  726.                say you are a purchasing manager at a retail
  727.                store.  Vendor XYZ calls to tell you that there
  728.                has been an across the board price 5% increase on
  729.                their products.  If you buy five or six items
  730.                from vendor XYZ, you can simply use your
  731.                application program and go into the items and
  732.                calculate the new cost.  However, if you have
  733.                1000 items, this is hardly proctical.
  734.  
  735.                This is where BTVIEWER can come in.  After you
  736.                make sure the .DDF files and the data files are
  737.                in the current working directory or in a
  738.                directory in the BTFILEPATH environment variable,
  739.                you start BTVIEWER.  You go to the View sub-menu,
  740.                and first choose the File option.  You will be
  741.                presented with a list of files that are described
  742.                in your .DDF files.  You select the ITEM file.
  743.  
  744.                Next you choose the Field option of the View
  745.                sub-menu, then the Add Fields option.  Here you
  746.                will be presented with a list of the fields in
  747.                your selected file (the ITEM file).  Since you
  748.                need to restrict the view to vendor XYZ, you
  749.                select the Vendor field.  Since you wish to
  750.                modify the Cost field, you select the Cost field.
  751.                As you add fields, they are listed to the right
  752.                of your screen.
  753.  
  754.                You can now exit the Field selection screen by
  755.                pressing ESC.  Now you need to limit your view to
  756.                items from vendor XYZ.  Choose Restrict from the
  757.                View sub-menu, and then Add/Edit restrictions.
  758.                This brings you to a screen (or a series of
  759.                screens if you select many fields as part of your
  760.                view) that has the field names to the left and a
  761.                data entry field to the right.  This is a "Query
  762.                by Form" screen that lets you set restrictions
  763.                on each field in the view.  Since we wish to
  764.                restrict our view to items from vendor XYZ, we
  765.                move to the Vendor field and enter the following
  766.                text: ="XYZ"  The quotes are not essential unless
  767.                leading or trailing blanks are significant.
  768.  
  769.                We can now press F10 to indicate we are done with
  770.                setting restrictions.  We should now display the
  771.                data before modifying it to ensure that we are
  772.                getting the result we expect.  We could first go
  773.                to the Sort sub-menu and choose a sort that
  774.                begins with the Vendor field, since when the view
  775.                is sorted by a field with a restriction it will
  776.                generally result in better performance while
  777.                searching for records.
  778.  
  779.                If the items we see in the view appear to be what
  780.                you wish to modify, you next select Modify All in
  781.                View from the View sub-menu, followed by Modify
  782.                all.  You will be presented with a screen much
  783.                like the Query by Form screen described
  784.                previously, except that on this screen you enter
  785.                information on how the fields in the view should
  786.                be modified.  Go to the Cost field and enter:
  787.                *1.05  This means "Multiply every cost field by
  788.                1.05"  This will result in the cost field being
  789.                increased by 5%.  If the retail price was also in
  790.                the view, at the same time we could have modified
  791.                it as well.  On the other hand, we could have
  792.                just as easily said, "How dare XYZ raise prices
  793.                by 5%!" and decided to delete all XYZ products
  794.                from our item file by selecting the Delete All
  795.                option under Modify all in View.
  796.  
  797.                There you have it.  A quick look at what BTVIEWER
  798.                can do with "Views."  Now for more specific
  799.                information on options:
  800.  
  801.  
  802.          1. File
  803.  
  804.                This is pretty straigntforward.  If BTVIEWER
  805.                cannot find the FILE.DDF file it will tell you
  806.                so.  Otherwise a list of files will appear.
  807.                Select the file you wish to view.
  808.  
  809.          2. Field
  810.  
  811.                   a. Add Fields
  812.  
  813.                      From the Fields listed, select any fields
  814.                      you wish to see as part of your View.
  815.                      Fields may be selected in any order and
  816.                      will be displayed, left to right, in the
  817.                      order you select.
  818.  
  819.                      The last option on the field selection menu
  820.                      is "* Calculated *".  Select this if you
  821.                      want a calculated field added to your view.
  822.                      You may use the +, -, * and / operators,
  823.                      and operands can be fields in the file or
  824.                      constant values.  Calculations are done
  825.                      left to right:  That is, 1+2*3 would be 9,
  826.                      not 6.
  827.  
  828.                   b. Delete Fields
  829.  
  830.                      If any fields are selected, you will be
  831.                      able to delete them from the View.
  832.  
  833.                   c. Clear Fields
  834.  
  835.                      This option clears all fields from the
  836.                      current View.
  837.  
  838.                   d. Define Summary
  839.  
  840.                      This option presents you with a menu of
  841.                      fields currently in the View.  Toggle
  842.                      selection of fields by pressing ENTER when
  843.                      the field is highlighted.  Fields with a
  844.                      check mark next to them when you exit the
  845.                      menu by pressing <F10> will have summary
  846.                      information printed about them.
  847.  
  848.                      Summary for numeric fields includes MIN, MAX,
  849.                      SUM, AVG.  Summary for string fields includes
  850.                      MIN and MAX.
  851.  
  852.                   e. Print/Display Summary
  853.  
  854.                      This option reads through the current View
  855.                      (which could be the entire file if no
  856.                      restrictions are set) and displays the
  857.                      resulting report, with an option to print
  858.                      the report.
  859.  
  860.                   f. Joins
  861.  
  862.                      i. Set-up join
  863.  
  864.                         This option allows you to select a primary
  865.                         field, a secondary file to join to, and an index
  866.                         in the secondary file to cause the link to
  867.                         occur.  The join is much more relaxed that
  868.                         joins in other programs.  If the link is
  869.                         plausable it is allowed.  For instance, any
  870.                         number field with 0 decimals can be linked
  871.                         with any other number field with 0 decimals.
  872.                         Follow the on-screen instructions.  After a
  873.                         successful join, add fields from the
  874.                         secondary file.
  875.  
  876.                      ii. Clear join
  877.  
  878.                         This option clears all information about a
  879.                         previously defined join.
  880.  
  881.          3. Restrict
  882.  
  883.                   a. Add/Edit Restrictions
  884.  
  885.                      This Query by Form screen allows you to specify what
  886.                      subset of records will be part of the current "view."
  887.                      In the field to the right of each field name, you can
  888.                      enter a line like the following:
  889.  
  890.                      Part Number: >2000_______________________________
  891.  
  892.                      In the example above, if the Part Number is a number
  893.                      type (Decimal, Numeric, Integer, Float, Bfloat or
  894.                      Unsigned) this will restrict the view to records
  895.                      where the Part Number field evaluates to greater
  896.                      than 2000.  If Part Number is a string type (Zstring,
  897.                      Lstring or String) records where the Part Number is
  898.                      alphabetically greater than 2000.  If trailing
  899.                      spaces are significant in the value, enclose the
  900.                      value in quotes.
  901.  
  902.                      The pattern is: <operator> <value> [and <value>] where
  903.                      operator can be any of the following:
  904.  
  905.                      <>, !=, NOT EQUAL TO, NOT EQUALS, NOT EQUAL, NE
  906.  
  907.                      <=, LESS THAN OR EQUAL, LTE
  908.  
  909.                      <, LESS THAN, LT
  910.  
  911.                      >=, GREATER THAN OR EQUAL, GTE
  912.  
  913.                      >, GREATER THAN, GT
  914.  
  915.                      =, EQUAL TO, EQUALS, EQUAL, EQ
  916.  
  917.                      CONTAINS
  918.  
  919.                      DOES NOT CONTAIN, DOESN'T CONTAIN
  920.  
  921.                      ALL SPACES
  922.  
  923.                      NOT ALL SPACES
  924.  
  925.                      LIKE
  926.  
  927.                      NOT LIKE
  928.  
  929.                      BETWEEN
  930.  
  931.                      Most of the above are self explanatory, however, some
  932.                      require explanation.  CONTAINS, DOESN'T CONTAIN, LIKE,
  933.                      NOT LIKE, ALL SPACES and NOT ALL SPACES only work with
  934.                      String type fields, and are ignored for other types.
  935.                      LIKE and NOT LIKE work by comparing strings with wild
  936.                      carding similar to MS-DOS wild cards ('?' means any
  937.                      character, '*' means anything to the right is OK).  We
  938.                      also allow '#' to mean any digit, and '~' to mean any
  939.                      alphabetic character.  BETWEEN is the only restriction
  940.                      type that requires two values, separated by "AND".
  941.                      NOT ALL SPACES and ALL SPACES take no arguments, and is
  942.                      valid only for string type fields.
  943.  
  944.                      Also note that if you are doing a restrict on a large
  945.                      file, it might pay to have one of your restricts on the
  946.                      first field (segment) of the current sort, since this
  947.                      will make things go LOTS faster.
  948.  
  949.                   b. Clear Restrictions
  950.  
  951.                      This option clears all restrictiond from
  952.                      the current View.
  953.  
  954.          4. Sort
  955.  
  956.                You may select here one of the existing sorts
  957.                defined in the .DDF file, or a User-Defined sort.
  958.                If the User Defined sort is selected, the program
  959.                will pause to ask you if you want to build the
  960.                supplemental index.  If you answer "Yes" the
  961.                program will build it, taking some period of time
  962.                dependent upon the size of the file and the
  963.                complexity of the sort requested.  If you answer
  964.                "No" the user defined sort is abandoned.
  965.  
  966.                When a user defined sort is in effect and you go
  967.                to exit the program or change files, BTVIEWER
  968.                will drop the supplemental index, which might
  969.                also take a little time, dependent upon the size
  970.                of the file.
  971.  
  972.          5. Display/Edit
  973.  
  974.                On this screen, records in the view are
  975.                displayed, one record per line.  Use the arrow
  976.                keys to move around.  To Edit, Hex edit, Delete
  977.                or Add a record, press ENTER when the record in
  978.                question is highlighted.
  979.  
  980.          6. Print
  981.  
  982.                This produces a simple listing of the view.
  983.  
  984.          7. Import/Export
  985.  
  986.                   a. Import View
  987.  
  988.                         You must supply the name of an
  989.                         comma-delimited ASCII file.  It must
  990.                         have the fields in the same order as the
  991.                         current View.
  992.  
  993.                   b. Export View
  994.  
  995.                         i. Comma-delimited ASCII
  996.  
  997.                            You supply the name of an ASCII file to
  998.                            be produced.  The fields in the
  999.                            resulting file will be in the same order
  1000.                            as the fields are defined in the view.
  1001.  
  1002.                         ii. dBASE III format.
  1003.  
  1004.                            You supply the name of a dBASE III file to
  1005.                            be produced.  The fields in the
  1006.                            resulting file will be in the same order
  1007.                            as the fields are defined in the view.  If
  1008.                            the file exists, it MUST contain fields just
  1009.                            like in the view.
  1010.  
  1011.          8. Modify All in View
  1012.  
  1013.                   a. Modify All
  1014.  
  1015.                        This Modify by Example screen allows you to specify
  1016.                        how to modify the records in the current view.  In
  1017.                        the field to the right of each field name, you can
  1018.                        enter a line like the following:
  1019.  
  1020.                        Unit Retail: *1.05__________________________
  1021.  
  1022.                        In the example above, if the Unit Retail is a number
  1023.                        type (Decimal, Numeric, Integer, Float, Bfloat or
  1024.                        Unsigned) this will multiply each Unit Retail in the
  1025.                        view by 1.05, in this case increasing the unit
  1026.                        retail by 5%.  If Unit Retail is a string type the
  1027.                        above line will have no effect!  The only allowed
  1028.                        operator for strings is '=' which simply sets the
  1029.                        string to that which is to the right of the equal
  1030.                        sign, ignoring leading and trailing spaces not
  1031.                        enclosed in quotes.
  1032.  
  1033.                        The general pattern is <operator> <value>
  1034.                        [with <value>] where <operator> is one of the
  1035.                        following:
  1036.  
  1037.                                         + (Addition)
  1038.                                         - (Subtraction)
  1039.                                         * (Multiplication)
  1040.                                         / (Division)
  1041.                                         = (Assignment or equals)
  1042.                                         REPLACE
  1043.  
  1044.                        <value> can be a literal (like "1.23") or
  1045.                        a field name.
  1046.  
  1047.                        'REPLACE' is used in a line as follows:
  1048.  
  1049.                             REPLACE "Bob" with "Robert"
  1050.  
  1051.                        'REPLACE' is case sensitive (one of the only
  1052.                        commands that is).
  1053.  
  1054.                        It is probably a good idea to Display the current
  1055.                        view before doing a batch modify to ensure you have
  1056.                        phrased your restrictions properly.  In addition, be
  1057.                        aware of some subtle problems.  If, for example, your
  1058.                        restriction is something like "Unit Retail > 9.99"
  1059.                        and your view sorts on Unit Retail, and your Modify
  1060.                        by Example specifies "Unit Retail *1.2", be aware that
  1061.                        those Unit Retails will be modified in a loop that
  1062.                        will make the data worthless.  Since you are
  1063.                        modifying Unit Retail, when you hit the first unit
  1064.                        retail for lets say 10.00, when it is reinserted as
  1065.                        12.00, it will change places in the sort, since you
  1066.                        are sorting on Unit Retail, and it will be modified
  1067.                        again, and again, and again...
  1068.  
  1069.                        If you do not understand the implications of the
  1070.                        above example, just make sure that any modification
  1071.                        you do don't involve the primary key in your view.
  1072.  
  1073.                   b. Delete All
  1074.  
  1075.                        This option deletes all recodrs in the
  1076.                        current View.  BE SURE THIS IS WHAT YOU
  1077.                        WANT TO DO BY DISPLAYING THE VIEW FIRST!
  1078.  
  1079.          9. Save/Load View
  1080.  
  1081.               A "view" consists of a file, some fields, information
  1082.               on a JOIN if any, restrictions and a sort order.  A
  1083.               good convention would be to name all view files with a
  1084.               .VU extension.
  1085.  
  1086.                   a. Save current View
  1087.                   b. Load View
  1088.  
  1089.  
  1090.        E. The Options Sub-menu
  1091.  
  1092.          1. Set Colors
  1093.  
  1094.                Choose from the four color sets mentioned.
  1095.  
  1096.          2. Set Misc. Parameters
  1097.  
  1098.                Choose this option and you will be presented
  1099.                with a screen that looks like this:
  1100.  
  1101.                   Set BTVIEWER Misc. Options
  1102.  
  1103.                               [_] Load Btrieve?
  1104.                               [_] Load Brequest?
  1105.  
  1106.         Browse/Edit Open Mode: ___________
  1107.  
  1108.          Btrieve load options: ________________________
  1109.  
  1110.         Brequest load options: ________________________
  1111.  
  1112.    Memory to save for Btrieve: ______
  1113.  
  1114.        Owner name for Btrieve: ____________________
  1115.  
  1116.       Largest variable record: _____
  1117.  
  1118.   Print report to (LPT1, etc): ________________________
  1119.  
  1120.       Default File Name Mask: _____________________________
  1121.            (i.e. "*.DAT")
  1122.  
  1123.                The first two questions ask if you would like
  1124.                to load Btrieve and/or Brequest.  It might be
  1125.                better (from a memory control standpoint) to
  1126.                have Btrieve loaded BEFORE you run BTVIEWER,
  1127.                but it is often convenient to allow BTVIEWER
  1128.                to load it for you.
  1129.  
  1130.                The next question allows you to determine the
  1131.                open mode when files are browsed or edited
  1132.                (using the File/Browse-Edit Btrieve File menu
  1133.                option).  If you wish to ensure that the file
  1134.                is not changed, set Read-Only.  If working on
  1135.                a network, and you wish to have exclusive
  1136.                access to a file, set Exclusive.  To verify
  1137.                data as it is written (normally not needed
  1138.                and not very effective in any case) set
  1139.                Verify.  If you are working on a file where
  1140.                you are starting fresh and have nothing to
  1141.                lose, you may want to set Accelerated.  Note
  1142.                that Accelerated has no effect on speed of
  1143.                reading the file, and will leave your file
  1144.                damaged if it is not closed properly.  This
  1145.                option is included for completeness, not
  1146.                because we recommend this option.  All
  1147.                options are presented to you on a menu.
  1148.  
  1149.                The next two questions allow you to specify
  1150.                Btrieve and/or Brequest start-up (load)
  1151.                options. Please see your Btrieve or Brequest
  1152.                manual for specifics.  Also, note that it is
  1153.                possible to give invalid load options to
  1154.                Btrieve that will prevent Btrieve from being
  1155.                loaded.  In that case, load Btrieve BEFORE
  1156.                you enter BTVIEWER and then correct the
  1157.                Btrieve load options.
  1158.  
  1159.                The amount of memory to save for Btrieve is
  1160.                dependent upon the version of Btrieve you are
  1161.                using, the load options you specify, and the
  1162.                availability of extended (or is that
  1163.                expanded...) memory.  Run Btrieve with the
  1164.                load parameters you expect to use and then
  1165.                run AMIMAP.EXE (a utility that reports on the
  1166.                space taken up by resident programs) and note
  1167.                how much space is taken up by Btrieve.  Add
  1168.                several thousand bytes to this for good luck,
  1169.                and this will reserve enough memory for
  1170.                Btrieve.  130000 is a safe number to use if
  1171.                this is too much for you to figure out.
  1172.  
  1173.                Owner name is the owner name to use when
  1174.                opening up Btrieve files that require an
  1175.                owner name.  If you don't know what this
  1176.                means, you probably don't need to fill this
  1177.                in.
  1178.  
  1179.                Largest variable record is important if you
  1180.                are going to read variable length record
  1181.                Btrieve files.  If you have too small a
  1182.                number here, you might get an error 22
  1183.                (buffer too short).  If you have too large a
  1184.                number here, you may have memory problems.
  1185.  
  1186.                Print report to specifies where reports
  1187.                (currently only the registration form and printing
  1188.                this documentation) should print.  This should
  1189.                almost always be LPT1 or PRN.  Try those if
  1190.                in doubt.
  1191.  
  1192.                The default file mask allows you to set the
  1193.                default file mask without having to enter it
  1194.                on the command line each time.  The default
  1195.                is "*.DAT", but for many "*.BTR" is more
  1196.                convenient.
  1197.  
  1198.          3. Reset Btrieve
  1199.  
  1200.                Issues a RESET command to Btreive.  Closes any open
  1201.                files.
  1202.  
  1203.          4. REGISTER BTVIEWER
  1204.  
  1205.                If you like what you see, and would like to
  1206.                make sure that shareware programs like
  1207.                BTVIEWER are produced, you must
  1208.                register and pay for the use of the program.
  1209.                The $79.00 requested (for a single user copy)
  1210.                is a steal, and to further entice you, we even
  1211.                made up this neat utility to print out the
  1212.                registration form for you.  Simply fill in
  1213.                the requested information and the form will
  1214.                be printed.  Fill in the number of single
  1215.                user or site licenses, the size disks you
  1216.                wish to receive, and mail it to the address on
  1217.                the form.  You can always just jot down your
  1218.                name and address and mail that in with a
  1219.                notation that you are registering for
  1220.                BTVIEWER, but what the heck, that's what
  1221.                computers are for!
  1222.  
  1223.                Another registration option for CompuServe
  1224.                subscribers is to use the new CIS Shareware
  1225.                Registration service.  Expected to be available
  1226.                in July, 1992, type GO SWREG at any '!' prompt.
  1227.                Registrations are billed directly to your CIS
  1228.                account.  This is ideal for international users
  1229.                of CompuServe.  BTVIEWER's Registration ID is
  1230.                135.  BTFILER'S Registration ID is 1.
  1231.  
  1232.                If you register, you will get:
  1233.  
  1234.                         A copy of the latest version of the
  1235.                            BTVIEWER system.
  1236.                         A printed manual.
  1237.                         Notice of future upgrades.
  1238.                         Information on future products.
  1239.                         Support for a MINIMUM of 90 days.
  1240.                         A copy of our BU partial BUTIL
  1241.                            replacement program.
  1242.                            This program STOPs, RESETs Btrieve,
  1243.                            shows BTRIEVE version and CLONEs
  1244.                            Btrieve files.  You may distribute
  1245.                            this freely.
  1246.  
  1247.  
  1248.  
  1249.        E. The Help Sub-menu
  1250.  
  1251.          These options are self explanatory (and non-
  1252.          threatening if you just try them out).
  1253.  
  1254.          1. List Error Codes
  1255.  
  1256.          2. List Operation Codes
  1257.  
  1258.          3. Page Size Calculator - For the designer of Btrieve
  1259.             file databases, allows for the creation of files
  1260.             with the minimum amout of space wasted.
  1261.  
  1262.          3. About BTVIEWER
  1263.  
  1264. 5.  Getting help/making suggestions/future directions
  1265.  
  1266.      If you are a registered user, or if you are having a
  1267.      problem getting started, PLEASE contact us at:
  1268.  
  1269.                         Access Microsystems Inc.
  1270.                         404 Midstreams Road
  1271.                         Brick, NJ  08724-3838
  1272.  
  1273.                         (908) 892-2683
  1274.                         CIS: 74040,607
  1275.  
  1276.      We generally work 9 to 5, Monday through Friday.  We
  1277.      may not always be here when you call, but we will try
  1278.      to return calls if you leave a SPECIFIC message.  We
  1279.      monitor Compuserve (CIS) messages daily for support
  1280.      purposes, but understand that not everyone is ready for
  1281.      E-Mail.
  1282.  
  1283.      We seek your advice on future directions for this and
  1284.      other products.  We expect (if the interest in BVIEWER
  1285.      warrants) a follow-on product that will add some additional
  1286.      features.
  1287.  
  1288.  
  1289.  
  1290.  
  1291.                   APPENDIX A - Listing of SAMPLE.BTB
  1292.  
  1293. The following is a listing of SAMPLE.BTB, An ASCII file that
  1294. describes a BTRIEVE file to be built with BTVIEWER's
  1295. File/Misc. Btrieve Functions/Create File from BTB file menu
  1296. option.  Please modify this file to create the type of file
  1297. YOU need.  Keep the BTB file you create on line to rebuild
  1298. the file you create as needed.
  1299.  
  1300. #
  1301. #       This line (and all lines beginning with '#') are COMMENTS.
  1302. #
  1303. #       This is a sample BTrieve Build (BTB) file.  It allows for the
  1304. #       creation of Btrieve files in BTFILER.  It does the same thing
  1305. #       as the BUTIL -CREATE function, but with one significant
  1306. #       difference:  Error diagnostics are clearer.  This removes (I
  1307. #       think) the most significant problem with the BUTIL -CREATE
  1308. #       process.  Someday an interactive create utility will be part
  1309. #       of BTFILER, but until then, this will have to do...
  1310. #
  1311. #       Case is not important, and some fields are optional (as
  1312. #       noted in comments).
  1313. #
  1314. #       These are the fields possible listed in order of appearance
  1315. #       in the file level settings section:
  1316. #
  1317. #               RECORD LEN=n
  1318. #               PAGE SIZE=n, multiple of 512
  1319. #               VARIABLE=<YES or NO>
  1320. #               BLANK TRUNCATION=<YES or NO>      OPTIONAL!
  1321. #               DATA COMPRESSION=<YES or NO>
  1322. #               FREE SPACE THRESHOLD=<10, 20 or 30>
  1323. #               ALTERNATE FILE=<filename>         OPTIONAL if no alternate key
  1324. #               INCLUDE DATA=<YES or NO>          OPTIONAL!
  1325. #               NUMBER OF KEYS=n
  1326. #
  1327. #
  1328. # These are file level settings, with more details...
  1329. #
  1330. RECORD LEN=131
  1331. #
  1332. # In the Help menu, see "Calculate Page Size" to find optimal size.
  1333. #
  1334. PAGE SIZE=1536
  1335. VARIABLE=NO
  1336. #
  1337. # BLANK TRUNCATION is only meaningful with variable length
  1338. #       records, so this BLANK TRUNCATION= line is optional.
  1339. #
  1340. BLANK TRUNCATION=NO
  1341. DATA COMPRESSION=NO
  1342. #
  1343. # FREE SPACE THRESHOLD=n, where 'n' is 10, 20 or 30 ONLY!
  1344. #
  1345. FREE SPACE THRESHOLD=20
  1346. #
  1347. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1348. #         UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1349. #         key segments exist.
  1350. #
  1351. ALTERNATE FILE=UPPER.ALT
  1352. #
  1353. #  INCLUDE DATA=<Y or N> is used to determine if the file is key only
  1354. #        Data only, or key and data.  INCLUDE DATA= line is OPTIONAL!
  1355. #
  1356. #  For KEY ONLY:   INCLUDE DATA=NO
  1357. #                  NUMBER OF KEYS=1
  1358. #  and key length is == to record length.
  1359. #
  1360. #  For DATA ONLY:  INCLUDE DATA=YES
  1361. #                  NUMBER OF KEYS=0
  1362. #
  1363. INCLUDE DATA=Yes
  1364. #
  1365. #  NUMBER OF KEYS= is used as a cross check of the segments
  1366. #       passed below.  In case of a conflict, the option is given
  1367. #       to accept the key count reflected in the segments, or
  1368. #       abandoning creation of the file.
  1369. #
  1370. NUMBER OF KEYS=2
  1371. #
  1372. #  END OF FILE LEVEL SETTINGS!
  1373. #
  1374. #  This marks the beginning of key segment level information.
  1375. #       If I were you, and I were creating BTB files, I would
  1376. #       place a large comment band between each key segment
  1377. #       to remind myself what I think I am doing.  Just a
  1378. #       thought...
  1379. #
  1380. #  The lines for each key segment are in the following order:
  1381. #
  1382. #       START=n, where 'n' is the starting position of the key
  1383. #       LEN=n, where 'n' is the length of the key
  1384. #       MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1385. #                        Allows Modifications to be made to the key?
  1386. #       DUPLICATES=s, ditto above...Allows Duplicate keys?
  1387. #       ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1388. #       DESCENDING=s, like above.  Sorts Hi to Lo?
  1389. #       TYPE=t, where 't' is EXACTLY one (case difference OK) of the following:
  1390. #
  1391. #               "String",
  1392. #               "Integer",
  1393. #               "Float",
  1394. #               "Date",
  1395. #               "Time",
  1396. #               "Decimal",
  1397. #               "Money",
  1398. #               "Logical",
  1399. #               "Numeric",
  1400. #               "Bfloat",
  1401. #               "Lstring",
  1402. #               "Zstring",
  1403. #               "Unsigned Binary",
  1404. #               "Autoincrement",
  1405. #
  1406. #       NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1407. #                  NULL=N/A to explicitly state no NULL value.
  1408. #                  NULL= is OPTIONAL.
  1409. #       SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1410. #                  segments with a SEGMENT=No value should be the same
  1411. #                  as the number of keys you declare.
  1412. #
  1413. #
  1414. #  Key 0/Segment 1
  1415. #
  1416. START=1
  1417. LEN=11
  1418. MODIFIABLE=n
  1419. DUPLICATES=n
  1420. ALTERNATE=n
  1421. DESCENDING=n
  1422. TYPE=STRING
  1423. NULL=N/A
  1424. SEGMENT=NO
  1425. #
  1426. #  key 1/segment 1
  1427. #
  1428. START=12
  1429. LEN=30
  1430. MODIFIABLE=y
  1431. DUPLICATES=y
  1432. ALTERNATE=y
  1433. DESCENDING=n
  1434. TYPE=STRING
  1435. NULL=N/A
  1436. SEGMENT=YES
  1437. #
  1438. #  key 1/segment 2
  1439. #
  1440. START=1
  1441. LEN=11
  1442. MODIFIABLE=y
  1443. DUPLICATES=y
  1444. ALTERNATE=y
  1445. DESCENDING=n
  1446. TYPE=STRING
  1447. NULL=N/A
  1448. SEGMENT=NO
  1449. #
  1450. #  That's all, folks!
  1451. #
  1452.       Appendix A - Listing of SAMPLE.BTB and SAMPLE.BTS
  1453.  
  1454.  
  1455. Use the following file (supplied on disk as well) that
  1456. allows you to create a Btrieve file by describing it in an
  1457. ASCII file.  Modify it for your needs and run the
  1458. File/Misc. Btrieve Functions/Create file using BTB file menu
  1459. option.  When asked, supply the name of the BTB file you
  1460. have modified for your use, or use the SAMPLE.BTB file to
  1461. see how the system works.
  1462.  
  1463. #
  1464. #       This line (and all lines beginning with '#') are COMMENTS.
  1465. #
  1466. #       This is a sample BTrieve Build (BTB) file.  It allows for the
  1467. #       creation of Btrieve files in BTVIEWER.  It does the same thing
  1468. #       as the BUTIL -CREATE function, but with one significant
  1469. #       difference:  Error diagnostics are clearer.  This removes (I
  1470. #       think) the most significant problem with the BUTIL - CREATE
  1471. #       process.  Someday an interactive create utility will be part
  1472. #       of BTVIEWER, but until then, this will have to do...
  1473. #
  1474. #       Case is not important, and some fields are optional (as
  1475. #       noted in comments).
  1476. #
  1477. #       These are the fields possible listed in order of appearance
  1478. #       in the file level settings section:
  1479. #
  1480. #               RECORD LEN=n
  1481. #               PAGE SIZE=n, multiple of 512
  1482. #               VARIABLE=<YES or NO>
  1483. #               BLANK TRUNCATION=<YES or NO>        OPTIONAL!
  1484. #               DATA COMPRESSION=<YES or NO>
  1485. #               FREE SPACE THRESHOLD=<10, 20 or 30>
  1486. #               ALTERNATE FILE=<filename>       OPTIONAL if no alternate key
  1487. #               INCLUDE DATA=<YES or NO>        OPTIONAL!
  1488. #               NUMBER OF KEYS=n
  1489. #
  1490. #
  1491. # These are file level settings, with more details...
  1492. #
  1493. RECORD LEN=131
  1494. #
  1495. # In the Help menu, see "Calculate Page Size" to find
  1496. optimal size.
  1497. #
  1498. PAGE SIZE=1536
  1499. VARIABLE=NO
  1500. #
  1501. # BLANK TRUNCATION is only meaningful with variable length
  1502. #       records, so this BLANK TRUNCATION= line is optional.
  1503. #
  1504. BLANK TRUNCATION=NO
  1505. DATA COMPRESSION=NO
  1506. #
  1507. # FREE SPACE THRESHOLD=n, where 'n' is 10, 20 or 30 ONLY!
  1508. #
  1509. FREE SPACE THRESHOLD=20
  1510. #
  1511. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1512. #         UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1513. #         key segments exist.
  1514. #
  1515. ALTERNATE FILE=UPPER.ALT
  1516. #
  1517. #  INCLUDE DATA=<Y or N> is used to determine if the file is key only
  1518. #         Data only, or key and data.  INCLUDE DATA= line is OPTIONAL!
  1519. #
  1520. #  For KEY ONLY:   INCLUDE DATA=NO
  1521. #                           NUMBER OF
  1522. KEYS=1
  1523. #  and key length is == to record length. #
  1524. #  For DATA ONLY:  INCLUDE
  1525. DATA=YES
  1526. #                           NUMBER OF KEYS=0
  1527. #
  1528. INCLUDE DATA=Yes
  1529. #
  1530. #  NUMBER OF KEYS= is used as a cross check of the segments
  1531. #       passed below.  In case of a conflict, the option is given
  1532. #       to accept the key count reflected in the segments, or
  1533. #       abandoning creation of the file.
  1534. #
  1535. NUMBER OF KEYS=2
  1536. #
  1537. #  END OF FILE LEVEL SETTINGS!
  1538. #
  1539. #  This marks the beginning of key segment level information.
  1540. #       If I were you, and I were creating BTB files, I would
  1541. #       place a large comment band between each key segment
  1542. #       to remind myself what I think I am doing.  Just a
  1543. #       thought...
  1544. #
  1545. #  The lines for each key segment are in the following order:
  1546. #
  1547. #       START=n, where 'n' is the starting position of the key
  1548. #       LEN=n, where 'n' is the length of the key
  1549. #       MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1550. #                        Allows Modifications to be made to the key?
  1551. #       DUPLICATES=s, ditto above...Allows Duplicate keys?
  1552. #       ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1553. #       DESCENDING=s, like above.  Sorts Hi to Lo?
  1554. #       MANUAL=s, like above.  Manual key?  OPTIONAL!
  1555. #       TYPE=t, where 't' is EXACTLY one (case difference OK) of the
  1556. #               following:
  1557. #
  1558. #               "String",
  1559. #               "Integer",
  1560. #               "Float",
  1561. #               "Date",
  1562. #               "Time",
  1563. #               "Decimal",
  1564. #               "Money",
  1565. #               "Logical",
  1566. #               "Numeric",
  1567. #               "Bfloat",
  1568. #               "Lstring",
  1569. #               "Zstring",
  1570. #               "Unsigned Binary",
  1571. #               "Autoincrement",
  1572. #
  1573. #       NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1574. #                  NULL=N/A to explicitly state no NULL value.
  1575. #                  NULL= is OPTIONAL.
  1576. #       SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1577. #                  segments with a SEGMENT=No value should be the same
  1578. #                  as the number of keys you declare.
  1579. #
  1580. #
  1581. #  Key 0/Segment 1
  1582. #
  1583. START=1
  1584. LEN=11
  1585. MODIFIABLE=n
  1586. DUPLICATES=n
  1587. ALTERNATE=n
  1588. DESCENDING=n
  1589. TYPE=STRING
  1590. NULL=N/A
  1591. SEGMENT=NO
  1592. #
  1593. #  key 1/segment 1
  1594. #
  1595. START=12
  1596. LEN=30
  1597. MODIFIABLE=y
  1598. DUPLICATES=y
  1599. ALTERNATE=y
  1600. DESCENDING=n
  1601. TYPE=STRING
  1602. NULL=N/A
  1603. SEGMENT=YES
  1604. #
  1605. #  key 1/segment 2
  1606. #
  1607. START=1
  1608. LEN=11
  1609. MODIFIABLE=y
  1610. DUPLICATES=y
  1611. ALTERNATE=y
  1612. DESCENDING=n
  1613. TYPE=STRING
  1614. NULL=N/A
  1615. SEGMENT=NO
  1616. #
  1617. #  That's all, folks!
  1618. #
  1619.  
  1620. Use the following file (supplied on disk as well) that
  1621. allows you to create a Supplemental Index for a Btrieve file
  1622. by describing it in an ASCII file.  Modify it for your needs
  1623. and run the File/Misc. Btrieve Functions/Supplemental
  1624. Index/Create menu option.  When asked, supply the name of
  1625. the BTS file you have modified for your use, or use the
  1626. SAMPLE.BTS file to see how the system works.
  1627.  
  1628. #
  1629. #   This line (and all lines beginning with '#') are COMMENTS.
  1630. #
  1631. #   This is a sample BTrieve Supplemental Index (BTS) file.
  1632. #   It allows for the creation of a supplemental index (key)
  1633. #   for Btrieve files in BTVIEWER.  It does the same thing
  1634. #   as the BUTIL -SINDEX function, but with one significant
  1635. #   difference:  Error diagnostics are clearer.  This removes (I
  1636. #   think) the most significant problem with the BUTIL - SINDEX
  1637. #   process.  Someday an interactive utility for this will be part
  1638. #   of BTVIEWER, but until then, this will have to do...
  1639. #
  1640. #   Case is not important, and some fields are optional (as
  1641. #   noted in comments).
  1642. #
  1643. #   This field is the only field possible on the file level section:
  1644. #
  1645. #      ALTERNATE FILE=<filename>           OPTIONAL if no alternate key
  1646. #
  1647. #
  1648. #
  1649. #  ALTERNATE FILE=fname, where fname is the name of a file like
  1650. #     UPPER.ALT.  This line is optional IF no ALTERNATE=YES
  1651. #     key segments exist.
  1652. #
  1653. ALTERNATE FILE=UPPER.ALT
  1654. #
  1655. #  END OF FILE LEVEL SETTINGS!
  1656. #
  1657. #  This marks the beginning of key segment level information.
  1658. #     If I were you, and I were creating BTS files, I would
  1659. #     place a large comment band between each key segment
  1660. #     to remind myself what I think I am doing.  Just a
  1661. #     thought...
  1662. #
  1663. #  The lines for each key segment are in the following order:
  1664. #
  1665. #     START=n, where 'n' is the starting position of the key
  1666. #     LEN=n, where 'n' is the length of the key
  1667. #     MODIFIABLE=s, where 's' is Y or N (or YES or NO or Yes or...)
  1668. #                      Allows Modifications to be made to the key?
  1669. #     DUPLICATES=s, ditto above...Allows Duplicate keys?
  1670. #     ALTERNATE=s, where 's' is as above.  Alternate Collating Sequence?
  1671. #     DESCENDING=s, like above.  Sorts Hi to Lo?
  1672. #     MANUAL=s, like above, Manual key?  OPTIONAL!
  1673. #     TYPE=t, where 't' is EXACTLY one (case difference OK) of the following:
  1674. #
  1675. #                           "String",
  1676. #                           "Integer",
  1677. #                           "Float",
  1678. #                           "Date",
  1679. #                           "Time",
  1680. #                           "Decimal",
  1681. #                           "Money",
  1682. #                           "Logical",
  1683. #                           "Numeric",
  1684. #                           "Bfloat",
  1685. #                           "Lstring",
  1686. #                           "Zstring",
  1687. #                           "Unsigned Binary",
  1688. #                           "Autoincrement",
  1689. #
  1690. #     NULL=n, where 'n' is the decimal NULL value (commonly 0 or 32) OR
  1691. #                NULL=N/A to explicitly state no NULL value.
  1692. #                NULL= is OPTIONAL.
  1693. #     SEGMENT=s, where 's' is Y or N (or Yes or N0...).  The number of
  1694. #                segments with a SEGMENT=No value MUST be one in this case
  1695. #                since only a single supplemental index can be declared
  1696. #                at once.
  1697. #
  1698. #  Segment 1
  1699. #
  1700. START=1
  1701. LEN=22
  1702. MODIFIABLE=n
  1703. DUPLICATES=n
  1704. ALTERNATE=n
  1705. DESCENDING=n
  1706. TYPE=STRING
  1707. NULL=N/A
  1708. SEGMENT=NO
  1709. #
  1710. #  That's all, folks!
  1711. #
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.              Appendix B - Using Keystroke files
  1731.  
  1732.  
  1733. BTVIEWER allows for use of keystroke files to automate some
  1734. program functions.  What must be in the file is every
  1735. keystroke that is required to run a particular operation.
  1736. The only exception is the keystroke required to bypass the
  1737. registration reminder screen.  This screen is passed over
  1738. if a keystroke file is being played.
  1739.  
  1740. Most characters are self explanatory, but some special
  1741. characters may also be entered.  '!' is used where an enter
  1742. key would be played, and '#' substitutes for ESC.  Control
  1743. characters may be entered as the caret key ('^') followed by
  1744. the actual letter (i.e. 'C').  If the characters '^' 'C' are in
  1745. a keystroke file, and they are played back while in a data
  1746. entry field, they will clear the field.  Function keys may be
  1747. entered by preceding the two digit function key number with a
  1748. tilde ('~').  F10 is ~10.  It is easiest to use the mnemonic
  1749. characters (those highlighted on the menus) to select options,
  1750. and note currently there is a limit of 200 characters that may
  1751. be played back.  Below two batch files are listed that create
  1752. keystroke files on the fly and then feed them to BTVIEWER.
  1753.  
  1754.                          BTCLONE.BAT
  1755.  
  1756. echo off
  1757. if '%1' == '' goto NO_PARMS
  1758. if '%2' == '' goto NO_PARMS
  1759. goto OK
  1760. :NO_PARMS
  1761. echo USAGE: BTCLONE existing_file new_clone_file
  1762. goto END
  1763. :OK
  1764. rem
  1765. rem 'C' to choose Clone on opening menu, %1 the Btrieve
  1766. file, '!' for ENTER,
  1767. rem    %2 the New file, '!' for enter, and '###' for ESC's.
  1768. rem
  1769. echo C%1!%2!### >btclone.txt
  1770. btviewer /k:btclone.txt
  1771. del btclone.txt
  1772. :END
  1773.  
  1774.  
  1775.  
  1776.