home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / lan / btrv / btrv.txt < prev    next >
Text File  |  1992-06-06  |  46KB  |  1,141 lines

  1. Introduction
  2.  
  3. BTRV copyright (C) 1992 by Richard W. Hansen, all rights reserved.
  4. Btrieve and Butil are a copyrighted by Novell, Inc.
  5.  
  6. BTRV is a utility program for maintaining and creating files using the
  7. Btrieve record manager from Novell,Inc. BTRV was created primarily as an
  8. aid for programmers developing Btrieve applications, but can be
  9. invaluable to anyone who uses or maintains Btrieve files.
  10.  
  11. Some of BTRV's features are:
  12.  
  13. *   Easy file creation.
  14. *   Supports all key and file types.
  15. *   Supports variable length records.
  16. *   Browse and edit files.
  17. *   Clone files.
  18. *   Recover damaged file.
  19. *   Load and Save files in Butil format.
  20. *   Calculate optimum page sizes.
  21. *   Test record locking and transaction processing.
  22. *   View file statistics.
  23. *   Get record positon/Read record by position
  24.  
  25. Definition Of Shareware
  26.  
  27. Shareware distribution gives users a chance to try software before
  28. buying it. If you try a Shareware program and continue using it, you are
  29. expected to register. Individual programs differ on details -- some
  30. request registration while others require it, some specify a maximum
  31. trial period. With registration, you get anything from the simple right
  32. to continue using the software to an updated program with printed
  33. manual.
  34.  
  35. Copyright laws apply to both Shareware and commercial software, and the
  36. copyright holder retains all rights, with a few specific exceptions as
  37. stated below. Shareware authors are accomplished programmers, just like
  38. commercial authors, and the programs are of comparable quality. (In both
  39. cases, there are good programs and bad ones!) The main difference is in
  40. the method of distribution. The author specifically grants the right to
  41. copy and distribute the software, either to all and sundry or to a
  42. specific group. For example, some authors require written permission
  43. before a commercial disk vendor may copy their Shareware.
  44.  
  45. Shareware is a distribution method, not a type of software. You should
  46. find software that suits your needs and pocketbook, whether it's
  47. commercial or Shareware. The Shareware system makes fitting your needs
  48. easier, because you can try before you buy. And because the overhead is
  49. low, prices are low also. Shareware has the ultimate money-back
  50. guarantee -- if you don't use the product, you don't pay for it.
  51.  
  52.  
  53. Disclaimer
  54.  
  55. Users of BTRV must accept this disclaimer of warranty: "BTRV is supplied
  56. as is. The author disclaims all warranties, expressed or implied,
  57. including, without limitation, the warranties of merchantability and of
  58. fitness for any purpose. The author assumes no liability for damages,
  59.                                       1
  60.  
  61. direct or consequential, which may result from the use of BTRV."
  62.  
  63.  
  64. License Agreement
  65.  
  66. BTRV is a "Shareware program" and is provided at no charge to the user
  67. for evaluation. Feel free to share, but please do not give it away
  68. altered or as part of another system. If you find this program useful
  69. and find that you are using BTRV and continue to use BTRV after a
  70. reasonable trial period, you must make a registration payment of $50.00
  71. to Richard Hansen. The $50.00 registration fee will license one copy for
  72. use on any one computer at any one time, site licenses are available.
  73. You must treat this software just like a book. Each licensed copy may be
  74. used by only one person at a time, just as a book cannot be read by two
  75. different persons at the same time.
  76.  
  77. Commercial users of BTRV must register and pay for their copies of BTRV
  78. within 30 days of first use or their license is withdrawn. Site license
  79. arrangements may be made by contacting Richard Hansen.
  80.  
  81. Anyone distributing BTRV for any kind of remuneration must first contact
  82. Richard Hansen for authorization.
  83.  
  84.  
  85. How to Register and Get Help
  86.  
  87. To register, fill out a registration form and send $50.00 U.S. (non U.S.
  88. registrations add $10.00) for each copy being registered. For your 
  89. registration you will receive the latest version and complete printed 
  90. documentation. If you have any suggestions, problems, or questions please 
  91. contact me. 
  92.  
  93. Richard Hansen
  94. PO Box 18571
  95. St. Paul MN  55118-0571  USA
  96.  
  97. On the CompuServe Information Service at User ID :
  98.  
  99. 70242,3367
  100.  
  101.  
  102. Installation
  103.  
  104. The file "BTRV.EXE" is the only one you need. BTRV will create its
  105. configuration file, "BTRV.CFG", in the same directory as the BTRV
  106. program.
  107.  
  108.  
  109. Requirements
  110.  
  111. BTRV requires DOS 3.0 or greater and a minimum of 256K bytes of memory
  112. plus the memory your configuration of Btrieve needs. BTRV will run on
  113. any monochrome or color monitor. Since BTRV uses a text based windowing
  114. and pull down menu environment, use of a mouse is strongly recommended.
  115.  
  116. BTRV should work with any version of Novell's Btrieve, and supports most
  117. functions through version 5.10. It supports all file, record, and key
  118. types; including data only files and variable length records. You may
  119. create files with up to 24 segments, and can view files by any defined
  120. index path.
  121.                                       2
  122.  
  123.  
  124. Getting Started
  125.  
  126. This documentation is not intended as a tutorial on Btrieve, that is a
  127. subject of it's own. I hope that this documentation will serve as a
  128. thorough instruction in BTRV and its uses.
  129.  
  130. To start the program, you must first load Btrieve. A batch file, that
  131. loads the Btrieve Record manager and then BTRV, is the most convenient
  132. method. To ensure that you can open any file, it is best to start
  133. Btrieve with a page size of the maximum 4096 bytes.
  134.  
  135. If you want a file opened automatically, you can enter a path and
  136. filename on the command line. If you don't load a file from the command
  137. line, choose the Open option from the File menu. Type in a path and
  138. filename or use the Tab key to move to the file list box and choose a
  139. file. When you have typed in a filename or highlighted one in the list
  140. box, press Enter or click on the Open button with the mouse.
  141.  
  142. Once you have opened a file, pull down the View menu. From the View menu
  143. you can view various aspects of the current file. You may check the file
  144. statistics, view the data in the file records, or view the key buffer
  145. for the current record. In addition, you can browse through a window
  146. that displays the key fields defined for each record in the file.
  147.  
  148.  
  149. Basics for Using BTRV
  150.  
  151. When you start BTRV you will see a screen like the one below. At the top
  152. is the menu bar. At the right end of the menu bar is a clock that
  153. displays the current system time. To the left of the clock is a display
  154. of the free bytes of system memory. At the bottom of the screen is a
  155. status line that displays a few of the most commonly used hot key
  156. combinations. Between the menu bar and the status line is the desktop.
  157. The desktop is where all windows and dialog boxes will be opened and
  158. displayed.
  159.  
  160. All program functions are accessed from the main program menu. In
  161. addition, many functions have hot key combinations (see Appendix A) that
  162. can be used to invoke them. If you have a mouse, there are several
  163. functions available by clicking the mouse in the status line at the
  164. bottom of the screen.
  165.  
  166. A mouse is the easiest way to operate the program. Any option or program
  167. operation, except those that require character entry, such as file owner
  168. name, can be executed with a mouse. If you are familiar with Microsoft
  169. Windows, you should have no difficulty using BTRV with a mouse.
  170.  
  171. If you are using the keyboard, pressing F10 will move you to the menu
  172. bar. You can also type Alt and the first letter of the desired menu bar
  173. option, such as Alt-V for the View menu or Alt-F for the File menu. To
  174. Exit the program you can press Alt-X, select Exit from the File menu, or
  175. click the mouse on "Alt-X Exit" in the status line.
  176.  
  177.  
  178.  
  179.  
  180.  
  181.                                       3
  182.  
  183. ┌──────────────────────────────────────────────────────────────────────────┐
  184. │    File  Input  Output  View  Locks  Window  Misc          321232  09:18p│
  185. │   ┌─────────────────┐                                                    │
  186. │   │ Open...  Ctrl-O │                                                    │
  187. │   │ Create...       │                                                    │
  188. │   │ Clone...        │                                                    │
  189. │   │ Recover...      │                                                    │
  190. │   │ Load...         │                                                    │
  191. │   │ Save...         │                                                    │
  192. │   │ Close    Ctrl-C │                                                    │
  193. │   ├─────────────────┤                                                    │
  194. │   │ Set Owner       │                                                    │
  195. │   │ Clear Owner     │                                                    │
  196. │   ├─────────────────┤                                                    │
  197. │   │ Unload Btrieve  │                                                    │
  198. │   │ Reset  Btrieve  │                                                    │
  199. │   │ Exit      Alt-X │                                                    │
  200. │   └─────────────────┘                                                    │
  201. │                                                                          │
  202. │                                                                          │
  203. │                                                                          │
  204. │                                                                          │
  205. │                                                                          │
  206. │                                                                          │
  207. │                                                                          │
  208. │Alt-X Exit  Ctrl-Home First  Ctrl-End Last  Ctrl-N Next  Ctrl-P Prev      │
  209. └──────────────────────────────────────────────────────────────────────────┘
  210. Figure 1 - BTRV opening screen
  211.  
  212. Dialog Boxes
  213.  
  214. BTRV receives user input in dialog boxes. Only one dialog box may be
  215. open at a time. When you open a dialog box, one of the buttons will be
  216. highlighted in some manner, depending on your color setup. This button
  217. is the default and will be executed if you press Enter. Enter does not
  218. move from field to field, use Tab and Shift-Tab or the mouse for that.
  219.  
  220. Every dialog box has an OK button (or some equivalent such as Open) and
  221. a Cancel button. You can back out of any operation, from almost any
  222. point, by pressing Escape or selecting the Cancel button. When you press
  223. Enter, with the OK button as the default or highlighted button, whatever
  224. data you have in the dialog box will be used.
  225.  
  226. Dialog boxes also have close or cancel icons embedded in the upper left
  227. corner of the window frame. Clicking on the cancel icon with the left
  228. mouse button, will close the window or dialog. If you are using the
  229. keyboard you can press Escape to cancel a dialog box.
  230.  
  231. Dialog boxes will contain a variety of controls, from scrolling list
  232. boxes to check boxes and radio buttons. Each control will have an
  233. attached label that describes its purpose. Pressing the highlighted
  234. letter in the label, or clicking on the label or control will move you
  235. to that control. To jump to a new control from a text input line you
  236. will must press Alt and the highlighted letter in the label.
  237.  
  238.  
  239.  
  240.  
  241.                                       4
  242.  
  243. Check Boxes and Radio Buttons
  244.  
  245. Check boxes are used to select one or more items from a list of items.
  246. Radio buttons are used to select a single item from a list. In groups of
  247. check boxes or radio buttons the arrow keys move you between the
  248. different choices. In a check box group you may mark multiple items with
  249. the space bar. In a group of radio buttons you can select only one of
  250. the items, by moving through the group with the arrow keys.
  251.  
  252. Input Lines
  253.  
  254. Where keyboard data entry is required, a dialog box will contain a text
  255. input line. When you first enter an input line all existing text will be
  256. highlighted. Typing any alphanumeric character will delete the current
  257. text and replace it with what was just typed. To edit existing input
  258. press the left or right arrow key, Home, End or Insert first, or click
  259. the mouse on the desired position in the text.
  260.  
  261. With a mouse, press and hold the left button while moving the mouse to
  262. highlight text for deletion. Press the Delete key to remove the
  263. highlighted text.
  264.  
  265. If the text you have typed is to long to display in the input line, the
  266. text will scroll left and right in the input line. You will see left and
  267. right arrow icons at the start or end of the input line. Press the left or
  268. right arrow keys, or click the mouse on one of the icons, to scroll the text.
  269.  
  270. Many text input lines will have history lists attached to them. If an
  271. input line has an icon next to it, you may press the down arrow key
  272. or click on the icon to view the history list. Double click the mouse or
  273. press Enter on the highlighted item to place it into the input line.
  274.  
  275. Windows
  276.  
  277. BTRV uses text windows to display data. You may have multiple data
  278. windows open at the same time. When there are multiple windows open,
  279. clicking on any part of a window will move it to the front. To close a
  280. window click on the close icon in the upper left corner or press the F4
  281. key.
  282.  
  283. You can resize a window by pressing and holding the left mouse button
  284. down on the lower right corner of the window. With the mouse button held
  285. down, drag the window corner until the window is the desired size.
  286. Alternately, you can press Ctrl-F5 and use the arrows keys, while
  287. holding down a shift key. Press Escape or Enter when done resizing a
  288. window with the arrow keys.
  289.  
  290. To move a window, press and hold the left mouse button down on any part
  291. of the top window frame and drag the window to a new position. From the
  292. keyboard press Ctrl-F5 and use the arrow keys, press Escape or Enter
  293. when done.
  294.  
  295. To zoom or unzoom a window, click the mouse cursor on the zoom icon
  296. located in the upper right corner of the window frame. Double clicking
  297. on the top of the window frame will also zoom or unzoom a window. From
  298. the keyboard you should press the F5 key.
  299.  
  300.  
  301.                                       5
  302.  
  303. Scroll Bars
  304.  
  305. In list boxes, history lists, or text windows there may be horizontal
  306. and vertical scroll bars. In this case you may use the arrow keys, Page
  307. Up and Page Down to scroll the data. Home will move to the top of the
  308. window, End to the bottom. Page Up and Page Down move by one page, while
  309. Ctrl-Page Up and Ctrl-Page Down move to top and bottom of the list.
  310. With a mouse, click on the Up or Down arrow icons to scroll the data one line
  311. at a time. You may also click below or above the position indicator icon, in
  312. the scroll bar, to scroll by one page. Optionally, you may hold down the
  313. left mouse button on the position icon and drag the icon to reposition the
  314. data.
  315.  
  316.  
  317. File Menu Options
  318.  
  319. The File menu contains all the file related options in BTRV. You can
  320. open, create, clone, recover, load, or save a file. In addition, you can
  321. set or clear file owner names, unload and reset the Btrieve Record
  322. Manager.
  323.  
  324. PLEASE NOTE: Early versions of Btrieve (prior to 5.0) have no protection
  325. against overwriting existing files. Be careful not to enter the name of
  326. an existing file when entering the new filename for the create, recover,
  327. or clone operations.
  328.  
  329. Opening a File
  330.  
  331. You can have only one file open at a time, multiple files is a feature
  332. for some future version. If you already have a file open, this option is
  333. disabled until you close the current file. You open a file from the File
  334. menu or by pressing Ctrl-O.
  335.  
  336. ╔═[*]════════════════ Open File ════════════════════╗
  337. ║  File                              Owner          ║
  338. ║ [*.*                        ]     [        ]      ║
  339. ║                                                   ║
  340. ║  Directory                         Open Mode      ║
  341. ║ [C:\TP\B\                   ]      (*) Normal     ║
  342. ║                                    ( ) Accelerate ║
  343. ║  Files           Directories       ( ) Read Only  ║
  344. ║┌──────────────┬───────────────┐    ( ) Verify     ║
  345. ║│ B.BAT        #  ..\          #    ( ) Exclusive  ║
  346. ║│ BAK.BAT      ║  TEST\        ║                   ║
  347. ║│ BT.BAT       ║  A:\          ║                   ║
  348. ║│ BTRIEVE.TPU  ║  B:\          ║                   ║
  349. ║│ BTRIEVE.TRN  ║  C:\          ║      [ Open ]▄    ║
  350. ║│ BTRV.ASC     ║               ║       ▀▀▀▀▀▀▀▀    ║
  351. ║│ BTRV.CFG     ║               ║                   ║
  352. ║│ BTRV.DOC     ║               ║      [Cancel]▄    ║
  353. ║│ BTRV.EXE     ║               ║       ▀▀▀▀▀▀▀▀    ║
  354. ║│ BTRV6.PAS    ║               ║                   ║
  355. ║└──────────────┴───────────────┘                   ║
  356. ║  B.BAT         46         02/28/1992  07:08pm     ║
  357. ╚═══════════════════════════════════════════════════╝
  358. Figure 2 - Open File Dialog Box
  359.  
  360.  
  361.                                       6
  362.  
  363. To open a file you will be working in the Open File dialog box as seen
  364. above. You may type in a full path and filename, a file mask with wild
  365. card characters or use the file selection list. There is also a history
  366. list attached to the filename input that can be used to retrieve
  367. previously used filenames or masks.
  368.  
  369. The file you open can be on any drive or in any directory. Use the
  370. directories list box to switch drives or directories. Highlight a drive
  371. or directory. Next press Enter, double click on it with the mouse, or
  372. press the Open button to switch to the directory or drive.
  373.  
  374. The files in the current directory will be displayed in the files list
  375. box. Just highlight a file, then press Enter, double click on it with
  376. the mouse, or press the Open button to open it.
  377.  
  378. Both the file and directory list boxes will do incremental searches.
  379. When you are in one of the boxes, type as many letters as needed to
  380. reach a desired file. Use the Backspace key to remove letters and backup
  381. in your search.
  382.  
  383. If a file has been setup with an owner name, you will need to specify
  384. that name to open the file. The owner name must exactly match the one
  385. previously assigned to that file (please see your Btrieve manual for
  386. more information).
  387.  
  388. There is also a set of radio buttons that can be used to set the open
  389. mode. The standard Btrieve modes are summarized below, Normal is the
  390. default mode.
  391.  
  392. ┌───────────────────────────────────────────────────────────────┐
  393. │ Mode        Description                                       │
  394. │ Normal      The default mode, no special features.            │
  395. │ Accelerate  Disables Btrieve's data recovery features.        │
  396. │ Read Only   Allows access to a damaged file.                  │
  397. │ Verify      Enables DOS verify option.                        │
  398. │ Exclusive   Gives the workstation exclusive access to a file. │
  399. └───────────────────────────────────────────────────────────────┘
  400. Table 1 - Btrieve File Open Modes
  401.  
  402. Creating a File
  403.  
  404. The create file dialog allows you to specify all of a file's attributes.
  405. You can specify any characteristics available for Btrieve files. Three
  406. pieces of information must be entered, the filename, the record length,
  407. and the file page size. In addition you may add an alternate collating
  408. sequence, set any special file flags, set the number of data pages to
  409. preallocate to the file, and the free space threshold the file should
  410. maintain.
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                                       7
  422.  
  423. ╔[*]════════════════════════════ Create File ══════════════════════════════╗
  424. ║ File Name and Path                           File Flags                  ║
  425. ║[                                      ]      [ ] Variable Length Records ║
  426. ║                                              [ ] Blank Truncation        ║
  427. ║ Alt Collating Sequence                       [ ] Data Compression        ║
  428. ║[                                      ]      [ ] Key Only                ║
  429. ║                                                                          ║
  430. ║ Page Size         Record Size [0    ]        Free Space                  ║
  431. ║ (*)  512 Bytes                               (*)  0 %                    ║
  432. ║ ( ) 1024 Bytes    PreAllocate [0    ]        ( ) 10 %                    ║
  433. ║ ( ) 1536 Bytes                               ( ) 20 %                    ║
  434. ║ ( ) 2048 Bytes                               ( ) 30 %                    ║
  435. ║ ( ) 2560 Bytes                                                           ║
  436. ║ ( ) 3072 Bytes                                                           ║
  437. ║ ( ) 3584 Bytes           [ Create ]▄    [ Cancel ]▄    [ Define Keys ]▄  ║
  438. ║ ( ) 4096 Bytes            ▀▀▀▀▀▀▀▀▀▀     ▀▀▀▀▀▀▀▀▀▀     ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ║
  439. ╚══════════════════════════════════════════════════════════════════════════╝
  440. Figure 3 - Create File Dialog Box
  441.  
  442. When you have defined the file's attributes, press the Define Keys
  443. button. This will bring up a dialog box, as seen below, for defining the
  444. first key in the file. In this dialog you will set the key type, key
  445. attributes, key size, key position in the record and the key's null
  446. value. You must set the key type, position and length, all other
  447. information is optional.
  448.  
  449. ╔═[*]═══════════════ Key Segment #1 ════════════════════╗
  450. ║   Key Type               Key Attributes               ║
  451. ║   (*) String             [ ] Duplicate                ║
  452. ║   ( ) Integer            [ ] Modifiable               ║
  453. ║   ( ) Float              [ ] Null                     ║
  454. ║   ( ) Date               [ ] Segmented                ║
  455. ║   ( ) Time               [ ] Alt Collating Sequence   ║
  456. ║   ( ) Decimal            [ ] Descending               ║
  457. ║   ( ) Money              [ ] Manual                   ║
  458. ║   ( ) Logical                                         ║
  459. ║   ( ) Numeric            Position   [0    ]           ║
  460. ║   ( ) BFloat                                          ║
  461. ║   ( ) LString            Key Length [0  ]             ║
  462. ║   ( ) ZString                                         ║
  463. ║   ( ) Unsigned Binary    Null Value [0  ]             ║
  464. ║   ( ) Auto Increment                                  ║
  465. ║                                                       ║
  466. ║  [ OK ]▄   [ Cancel ]▄   [ Next Key ]▄   [ Prev Key ]▄║
  467. ║   ▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀▀▀▀▀    ▀▀▀▀▀▀▀▀▀▀▀▀║
  468. ╚═══════════════════════════════════════════════════════╝
  469. Figure 4 - Define Keys Dialog Box
  470.  
  471. You may define up to 24 keys or key segments. When you are done with a
  472. key, press the Next Key button to define another key, or press the Prev
  473. Key button to go back to the previous key definition. When all the keys
  474. have been defined press the OK button to return to then main file create
  475. dialog.
  476.  
  477. In the main dialog press the Create button to create your new file. Note
  478. that the file is not open after it is created.
  479.  
  480.  
  481.                                       8
  482.  
  483. If you need more information on file attributes or defining keys please
  484. refer to your Btrieve manual.
  485.  
  486. Cloning a File
  487.  
  488. Clone will create an empty copy of a file. The cloned file will have
  489. attributes identical to the original file, but will be empty. First, you
  490. must select the file to be cloned. This is done in the dialog box shown
  491. below. You may type a full path name or select one from the list of
  492. files. If the file has an owner, it must be specified in the Owner
  493. field. Press the Open button when you have a file selected. A second
  494. dialog box will open. Here you must type the name of the new file and
  495. press the OK button to clone the file.
  496.  
  497. ╔═[*]══════════════ File to Clone ══════════════════╗
  498. ║  File                              Owner          ║
  499. ║ [*.*                        ]     [        ]      ║
  500. ║                                                   ║
  501. ║  Directory                                        ║
  502. ║ [C:\TP\B\                   ]                     ║
  503. ║                                                   ║
  504. ║  Files           Directories                      ║
  505. ║┌──────────────┬───────────────┐                   ║
  506. ║│ B.BAT        #  ..\          #                   ║
  507. ║│ BAK.BAT      ║  TEST\        ║                   ║
  508. ║│ BT.BAT       ║  A:\          ║                   ║
  509. ║│ BTRIEVE.TPU  ║  B:\          ║                   ║
  510. ║│ BTRIEVE.TRN  ║  C:\          ║      [ Open ]▄    ║
  511. ║│ BTRV.ASC     ║               ║       ▀▀▀▀▀▀▀▀    ║
  512. ║│ BTRV.CFG     ║               ║                   ║
  513. ║│ BTRV.DOC     ║               ║      [Cancel]▄    ║
  514. ║│ BTRV.EXE     ║               ║       ▀▀▀▀▀▀▀▀    ║
  515. ║│ BTRV.PAS     ║               ║                   ║
  516. ║└──────────────┴───────────────┘                   ║
  517. ║  B.BAT         46         02/28/1992  07:08pm     ║
  518. ╚═══════════════════════════════════════════════════╝
  519. Figure 5 - Clone File Dialog Box
  520.  
  521. Recovering A File
  522.  
  523. This option will read all records from one Btrieve file and copy them to
  524. a new Btrieve file. You can use it to recover records from damaged
  525. files. Recover can also be used to compact a file, by creating a copy
  526. with all deleted records removed.
  527.  
  528. First, you must select the file to be recovered. This is done in a
  529. dialog box identical to the one for file cloning. In a second dialog box
  530. you will enter the name for the new file.
  531.  
  532. Loading A File
  533.  
  534. Load will read a DOS file created by the Save operation described below,
  535. or the Butil Save or Recover operations. Load inserts all records from a
  536. DOS file into a Btrieve file. Load works identically to the Butil Load
  537. operation.
  538.  
  539.  
  540.  
  541.                                       9
  542.  
  543. First, you select the file that will have records loaded into it. This
  544. is done in a dialog box identical to the one for file cloning. In a
  545. second dialog box you select the DOS file to be loaded.
  546.  
  547. Saving A File
  548.  
  549. Use Save to create a file to for use with Load or Butil. First, you
  550. select the file to be saved. This is done in a dialog box identical to
  551. the one for file cloning. In a second dialog box you will enter the name
  552. for the DOS file that records will be saved to.
  553.  
  554. Set Owner
  555.  
  556. This option is disabled unless you have a file open. Use it to add an
  557. owner name to the file. An owner name can be up to eight characters in
  558. length. Once you set an owner name, you will need to supply the exact
  559. same name every time you open the file.
  560.  
  561. In addition, you can set the file access mode for use after the owner is
  562. set. The possible access modes are summarized below, Owner Required is
  563. the default mode.
  564.  
  565. ┌──────────────────────────────────────────────────────────────────────┐
  566. │ Mode                    Description                                  │
  567. │ Owner Required          Requires owner name for any access.          │
  568. │ Read Only without Owner Permits read-only access without owner name. │
  569. │ Owner Required/Encrypt  Requires owner name for any access, data is  │
  570. │                         encrypted.                                   │
  571. │ Read Only/Encrypt       Permits read-only access without owner name, │
  572. │                         data is encrypted.                           │
  573. └──────────────────────────────────────────────────────────────────────┘
  574. Table 2 - File Access Modes with Owner
  575.  
  576. Clear Owner
  577.  
  578. This option is disabled unless you have a file open. Use this option to
  579. remove a owner name from a file.
  580.  
  581. Unload Btrieve
  582.  
  583. This option executes a standard Btrieve stop or operation number 25.
  584. Needless to say, you should not pick this unless you are done using the
  585. program.
  586.  
  587. Reset Btrieve
  588.  
  589. The Reset option issues a operation number 28 to the record manager.
  590. Reset will close any open files, release all locks, and abort any
  591. transaction.
  592.  
  593.  
  594. View Menu Options
  595.  
  596. The View menu gives you access to the various viewing options in BTRV.
  597. These include viewing the key buffer, record buffer, file statistics,
  598. and Btrieve version number.
  599.  
  600.  
  601.                                       10
  602.  
  603. View File Statistics
  604.  
  605. ┌─[*]─────────────── File Statistics: CUSTOMER.DAT ───────────────────┐
  606. │  Record Length   : 700              Record Count    : 537           #
  607. │  Page Size       : 3584             Unused Pages    : 0             ║
  608. │  Variable Length : No               Compressed      : No            ║
  609. │  Key Only        : No               Blank Truncation: No            ║
  610. │  Preallocation   : No               Free Threshold  :               ║
  611. │  Key Count       : 2                Longest Key     : 41            ║
  612. │  Total Segments  : 2                Current Index   : 0             ║
  613. │                                                                     ║
  614. │  Key    Pos   Size   Type     Dup Mod Man Alt Sup Nul       Total   ║
  615. │  ─────────────────────────────────────────────────────────────────  ║
  616. │    0      1     10  LString   No  No  No  No  No      ^       537   ║
  617. │    1     11     31  LString   Yes Yes No  Yes No      ^       532   ║
  618. │                                                                     ║
  619. └─────────────────────────────────────────────────────────────────────┘
  620. Figure 6 - Viewing File Statistics
  621.  
  622. This is a convenient way to do a quick check on a file. It lists all the
  623. information about a file that Btrieve returns. This includes the record
  624. size, page size, record count, file flags, and key definitions for each
  625. key segment defined in the file.
  626.  
  627. View Data Buffer
  628.  
  629. Select this option to look at the current record in a file's data
  630. buffer. This option is only available if you have a file open. The
  631. window displayed is very similar to those commonly used in disk file
  632. editors. You get two views of the data, one in ASCII characters and one
  633. in Hexadecimal notation.
  634.  
  635. ┌─[*]───────────── Data Buffer: CUSTOMER.DAT ─────────────────┐
  636. │092020202020202020311E436173682053616C65│        1 Cash Sale #
  637. │2020202020202020202020202020202020202020│                    ║
  638. │201E202020202020202020202020202020202020│ #                  ║
  639. │202020202020202020202020035A20201E202020│            $Z      ║
  640. │2020202020202020202020202020202020202020│                    ║
  641. │202020202020201E202020202020202020202020│       %            ║
  642. │2020202020202020202020202020202020200F20│                  ^ ║
  643. │2020202020202020202020202020000000000000│              ║
  644. │0000000000000000152830303029203030302D30│(000) 000-0║
  645. │303030202D20303030300F472020202020202020│000 - 0000@G        ║
  646. │2020202020200F20202020202020202020202020│      @             ║
  647. │2020000000000000000000000000000000000101│  @@║
  648. │6D0701001E436173682053616C65202020202020│m^&Cash Sale      ║
  649. │2020202020202020202020202020200000000000│               ║
  650. │0000000000000000000000000000000000000000│║
  651. └─ Pos : 1 ──────────────────────────────┴────────────────────┘
  652. Figure 7 - Viewing the File Data Buffer
  653.  
  654. Use the Tab key to move back and forth between the two view modes (ASCII
  655. or HEX). The relative position of the cursor is maintained when you move
  656. between ASCII and HEX mode. Note the position indicator in the lower
  657. left corner. This indicator shows the position starting from one (1),
  658. just as keys must be defined when creating a file.
  659.  
  660.  
  661.                                       11
  662.  
  663. The data buffer is fully compatible with all Btrieve record types. You
  664. can view fixed length as well as variable length records. When viewing
  665. variable length records you may get a buffer length error. The default
  666. buffer size is 16K bytes, and can be set up to 64K bytes. You may
  667. decrease or increase the buffer size as desired, from the Options sub-
  668. menu under Misc on the main menu bar.
  669.  
  670. Use the arrow keys, Page Up, Page Down, Ctrl-Page Up, Ctrl-Page Down to
  671. move through the data. Page Up and Page Down move one page at time.
  672. Ctrl-Page Up and Ctrl-Page Down move to the top and bottom of the buffer
  673. respectively. In addition, the scroll bar and mouse can be used.
  674.  
  675. This window is used in conjunction with the file Input Options defined
  676. below. Whenever you execute one of the input options, such as Get First
  677. or Get Next, the contents of the data buffer window will be updated. If
  678. you have not already read a record before opening the window, the data
  679. buffer will be empty.
  680.  
  681. You may have multiple data windows open. This can be useful for looking
  682. at different parts of large records. When you read a new record all open
  683. data windows will be updated.
  684.  
  685. The contents of the buffer are fully editable. In the HEX view, you may
  686. type the characters 0 through 9 and A through F. In the ASCII view,
  687. anything you can type at the keyboard will be accepted. Any changes in
  688. one view are reflected in the other, the changes are also updated in any
  689. other open data buffer windows you may have open.
  690.  
  691. If you change any data you can save the record back to the file by
  692. executing an Update operation, as described farther on in the file
  693. Output Options. You can even create new records and use the Insert
  694. operation to save them to disk.
  695.  
  696. View Key Buffer
  697.  
  698. View Key Buffer will give you a look at the current data in the key
  699. buffer. The data is displayed for the current access path (index).
  700.  
  701. This window displays its data identically to the data buffer window
  702. above. All the movement and editing, options apply to the key buffer
  703. window as well. However, the Update and Insert operations have no
  704. effect, they work on the data in the record data buffer only.
  705.  
  706. You may be wondering what good editing the key buffer can do. Well, if
  707. you do edit it, you can use the get by key operations, such as Get
  708. Equal, Get Greater, or Get Less. Admittedly, this is not the handiest
  709. way read a record by key, but it can be useful.
  710.  
  711. Browse File Key Fields
  712.  
  713. Use Browse to view the key fields defined for each record in a file. A
  714. scrolling window with one record per line will be displayed. The records
  715. are displayed in the order of the current key path. Every key segment
  716. can be viewed from left to right in the line. Each key segment will be
  717. displayed in a format appropriate for its defined data type.
  718.  
  719. You may scroll the window, left, right, up, or down to view records or
  720.  
  721.                                       12
  722.  
  723. parts of records that do not fit in the window. Page Up and Page Down
  724. move by one window at a time. Ctrl-Page Up and Ctrl-Page Down move to
  725. the first and last records in the file respectively.
  726.  
  727. On a large file all records can not be held in memory at one time. In
  728. this case, the window will provide a sliding view of the records in the
  729. file. When you reach the first or last record in memory more records
  730. will be read in as needed.
  731.  
  732. Since there is no way to quickly and reliably determine the number of
  733. active records in a Btrieve file, the scroll bars attached to the window
  734. are not accurate. They indicate the relative position in the list of
  735. records in memory, not in the file. When you hit the top or bottom the
  736. list, you will need to press the Up or Down arrow, or the Page Up or
  737. Down key, to read more records.
  738.  
  739. If you have a data buffer window open, you can press the space bar to
  740. display the highlighted record in the data buffer window. With a mouse
  741. double click on a record to update the record displayed.
  742.  
  743. View Btrieve Version
  744.  
  745. Will display the Btrieve version number.
  746.  
  747. Input Menu Options
  748.  
  749. This menu controls all file input operations. From this menu you can
  750. change the index being used, and execute various Btrieve read
  751. operations.
  752.  
  753. Key Path
  754.  
  755. This submenu displays a list of all possible key paths for a file. It is
  756. identical to the one in the Output menu. When a file is opened, the key
  757. path defaults to key one. If a file has more than one key defined, you
  758. can choose any key to use as the index for reading records.
  759.  
  760. If you change key paths while viewing records, on the next read
  761. operation you will get a Btrieve error seven, "Different Key Number".
  762. The simplest thing to do is just execute a Get First or Last operation,
  763. to establish a valid key path. You could also open up a key buffer
  764. window, enter a key value, and execute some get by key operation.
  765.  
  766. Read Operations
  767.  
  768. You can execute all the get and step operations from this menu. If you
  769. have a data buffer window open, its contents will be updated to reflect
  770. new records as they are read. The four operations, Get First, Get Last,
  771. Get Previous, and Get Next are also available on the status line.
  772.  
  773. Get Position
  774.  
  775. Will display the offset of the current record and add it to the history
  776. list of record offsets.
  777.  
  778.  
  779.  
  780.  
  781.                                       13
  782.  
  783. Get Direct
  784.  
  785. Use Get Direct to read a record by position. You may type the record offset in 
  786. the input line or press the history button to select from a list of saved 
  787. record offsets.
  788.  
  789. Output Menu Options
  790.  
  791. Key Path
  792.  
  793. This submenu displays a list of all possible key paths for a file. It is
  794. identical to the one in the Input menu. When a file is opened, the key
  795. path defaults to key one. If a file has more than one key defined, you
  796. can choose any key to use as the index for reading records.
  797.  
  798. Insert
  799.  
  800. Use this option to add a new record to a file. Admittedly, creating new
  801. records is not easy. Most likely, you will alter the keys and some data
  802. in an existing record, in a data buffer window, and then save as a new
  803. record.
  804.  
  805. Update
  806.  
  807. You can rewrite an existing record, using the same key values, with
  808. Update. Use a data buffer window to edit a record. Be careful when
  809. editing key fields, unless they were defined as modifiable you will get
  810. errors.
  811.  
  812. Delete
  813.  
  814. Delete removes the current record, the one held in the file data buffer
  815. (the same one as displayed in a data buffer window). If you have a key
  816. browse window open and select Delete, whatever record happened to be
  817. read last will be deleted. Be careful!
  818.  
  819. Transactions
  820.  
  821. If you have Btrieve configured correctly, you can play with transaction
  822. processing. While transactions are active a window with the message
  823. "TRANSACTIONS ON" will be visible.
  824.  
  825.  
  826. Locks Menu Options
  827.  
  828. You can use the Locks menu to test Btrieve's record locking. The default
  829. option is No Locks. Choosing Unlock All Records will release all locks,
  830. including multiple record locks. Please refer to your Btrieve manual for
  831. more information about the different types of record locks.
  832.  
  833.  
  834. Window Menu Options
  835.  
  836. This menu provides keyboard access to the functions for resizing,
  837. moving, zooming, and closing windows. All these functions are also
  838. available using hot key combinations or a mouse.
  839.  
  840.  
  841.                                       14
  842.  
  843. Misc Menu Options
  844.  
  845. This menu contains the page size calculator and program setup options.
  846.  
  847. Page Size Calculator
  848.  
  849. Enter the number of bytes in the record and the number of duplicate
  850. keys. A dialog box will display the utilization percentage rates for
  851. each possible page size from 512 byte to 4096 bytes. The optimum page
  852. size will be displayed at the bottom of the dialog box.
  853.  
  854. Colors
  855.  
  856. BTRV is compatible with any monitor, color, monochrome, or LCD.
  857. Initially, BTRV  will configure itself based on the type of monitor
  858. attached. If you have any problems try setting the color to one of the
  859. default sets described below.
  860.  
  861. You may customize all color settings in BTRV. The colors are divided
  862. into several areas, including Windows, Menus, Dialog Boxes. Within each
  863. area the colors are further broken down into colors for the various
  864. screen objects such as Buttons and Scroll Bars.
  865.  
  866. Default Colors
  867.  
  868. There are three default color sets available, Color, Black and White,
  869. and Monochrome. You probably won't use this option unless you have some
  870. problems with your display. BTRV configures itself based on the display
  871. adapter found. If you have a portable or a black and white VGA, and the
  872. colors are not right, try selecting the Black and White default color
  873. set.
  874.  
  875. Toggle Video Mode
  876.  
  877. On computers equipped with EGA or VGA, you can use this to display more
  878. data on the screen. EGA can be toggled to 43 line mode and VGA to 50
  879. line mode.
  880.  
  881. Change Interrupt
  882.  
  883. In some instances (mainly to avoid hardware conflicts) it is necessary
  884. to change the interrupt number that the Btrieve TSR is assigned. If you
  885. are using a version of Btrieve with a non-standard interrupt, you can
  886. configure BTRV for that new interrupt. The default interrupt is 123, the
  887. interrupt may be changed to any number from 0 through 255.
  888.  
  889. Change Buffer Size
  890.  
  891. When reading variable length records, the record size can (depending on
  892. the Btrieve version) be up to 64K bytes in length. To conserve memory
  893. BTRV uses a default size of 16384 bytes. If none of your variable length
  894. records are this big, or if they are bigger, you can change the size of
  895. the buffer. This will have no effect on memory use except for files with
  896. variable length records.
  897.  
  898.  
  899.  
  900.  
  901.                                       15
  902.  
  903. Save and Load Setup
  904.  
  905. If you want to make any configuration changes permanent, just select
  906. Save from the menu. BTRV will write out a file named "BTRV.CFG", in the
  907. program directory, to store your new configuration. Use Load to manually
  908. restore settings stored in the configuration file. Each time you run
  909. BTRV the new configuration will be read from disk.
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.                                       16
  962.  
  963. Appendix A - Hot Keys
  964.  
  965. Below is a list of all short cut keys that can be used in the program:
  966.  
  967. Menu Option         Keys        Function
  968. Open                Ctrl-O      Open a file
  969. Close               Ctrl-C      Close the current file
  970. Exit                Alt-X       Exit the program
  971. Get First           Ctrl-Home   Read first record in file
  972. Get Last            Ctrl-End    Read last record in file
  973. Get Previous        Ctrl-P      Read the previous record
  974. Get Next            Ctrl-N      Read the next record
  975. Get Equal           Ctrl-E      Read record with matching key
  976. Get Greater Than    Ctrl-G      Read record with key greater than
  977. Get Less Than       Ctrl-L      Read record with key less than
  978. Step Previous       Alt-P       Step to the previous record
  979. Step Next           Alt-N       Step to the next record
  980. Insert              Ctrl-I      Insert a new record
  981. Update              Ctrl-U      Update the current record
  982. Delete              Ctrl-D      Delete the current record
  983. Begin Transaction   Alt-B       Turn transaction processing ON
  984. Abort Transaction   Alt-A       Abort transaction processing
  985. End Transaction     Alt-E       Turn transaction processing OFF
  986. Statistics          Alt-S       View file statistics
  987. Data Buffer         Alt-D       View file data buffer
  988. Key Buffer          Alt-K       View file key buffer
  989. Btrieve Version     Ctrl-V      View the current Btrieve version
  990. Resize/Move         Ctrl-F5     Resize or move current window
  991. Zoom                F5          Zoom the current window
  992. Next                F6          Move to next window
  993. Prev                Shift-F6    Move to previous window
  994. Close               F4          Close current window
  995. Tile                F2          Tile all open windows
  996. Cascade             F3          Cascade all open windows
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.                                       17
  1022.  
  1023. Appendix B - Summary of Btrieve DOS Setup Options
  1024.  
  1025. BTRIEVE /M: memory size
  1026.         /P: page size
  1027.         /T: transaction filename
  1028.         /I: pre-image file drive
  1029.         /C
  1030.         /B: pre-image buffer size
  1031.         /F: open files
  1032.         /L: multiple locks
  1033.         /E
  1034.         /O
  1035.         /U: compression buffer size
  1036.         /N: number of files in transaction
  1037.         /A
  1038.  
  1039. MEMORY SIZE (/M)
  1040.   Defines total size of Btrieve's data area in K bytes. Default value
  1041.   is 32K, the range is 14K to 64K.
  1042.  
  1043. PAGE SIZE (/P)
  1044.   Specifies the maximum page size of any file to be accessed. Must be a
  1045.   multiple of 512 bytes in the range 512 to 4096.
  1046.  
  1047. TRANSACTION FILENAME (/T)
  1048.   Specifies the location for Btrieve to store the transaction control
  1049.   file.
  1050.  
  1051. PRE-IMAGE FILE DRIVE (/I)
  1052.   Directs the pre-image files to a drive other than the drive where the
  1053.   Btrieve files are located.
  1054.  
  1055. INDEX COMPACTION (/C)
  1056.   Tells Btrieve to perform index compaction on Update and Insert
  1057.   operations.
  1058.  
  1059. PRE-IMAGE BUFFER SIZE (/B)
  1060.   Specifies the total amount of memory Btrieve should use for preimaging
  1061.   buffers. The default value is 16K, the range is 1K to 64K.
  1062.  
  1063. OPEN FILES (/F)
  1064.   The maximum number of Btrieve files that can be open at one time.
  1065.   Default value is 20, the maximum value is 255.
  1066.  
  1067. MULTIPLE LOCKS (/L)
  1068.   Sets the maximum number of multiple record locks per workstation.
  1069.  
  1070. EXPANDED MEMORY (/E)
  1071.   With /E specified Btrieve will not use expanded memory.
  1072.  
  1073. OVERRIDE CRITICAL ERROR (/O)
  1074.   Controls how Btrieve responds to DOS critical errors. With /O,
  1075.   Btrieve will return a status code an application.
  1076.  
  1077. COMPRESSION BUFFER SIZE (/U)
  1078.   Allocates the length of the compression buffer. Range is 1K to 64K in
  1079.   one K byte increments.
  1080.  
  1081.                                       18
  1082.  
  1083. FILES IN A TRANSACTION (/N)
  1084.   Sets the maximum number of files that can be accessed within a
  1085.   transaction. Default is 12, range is 1 to 18.
  1086.  
  1087. ACTIVATE LOGGING (/A)
  1088.   When specified, Btrieve will record every operation that changes a
  1089.   file. Used with the rollback option in version 5.10.
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.                                       19