home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / btfl14.arj / BTFILER.DOC < prev    next >
Text File  |  1992-05-28  |  75KB  |  1,902 lines

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