home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / database / filebase.lbr / FILEBASE.DZC / FBASE.DOC
Encoding:
Text File  |  1990-03-18  |  25.0 KB  |  502 lines

  1.                    A BRIEF INTRODUCTION TO FILEBASE
  2.  
  3. This shareware version of FILEBASE will run without installation or
  4. modification on any CP/M 2.2 or later system.  However, the screen will be
  5. cleared by scrolling the old information off the top of the screen.  A much
  6. more enhanced instantaneous clear-screen method can be implemented but it
  7. is dependent on codes required by your hardware.  
  8.  
  9. ESTABLISHING THE CLEAR-SCREEN CODES FOR YOUR COMPUTER
  10.  
  11. The clear-screen codes that FILEBASE uses are external to the executable
  12. program code.  These codes are to reside in a file called FBCLRSCR.CDE
  13. which can be created with FILEBASE.  
  14.  
  15. Create a one field file by the name of FBCLRSCR.CDE with FILEBASE
  16. Option 6 - Create a File.  Enter into the first record the number of
  17. codes that are to follow in subsequent records.  There should be one
  18. code per record as shown in the following example.
  19.  
  20. Many CP/M computers such as Kaypro, Epson, Xerox, Morrow, Osborne,
  21. some Televideo's use the decimal value 26 as the clear-screen code.  
  22. This number is also applicable if your computer documentation tells
  23. you that your terminal (CRT) emulates an ADM-3A.  For these, the
  24. FBCLRSCR.CDE file should contain the numbers:
  25.                      1
  26.                     26
  27.  
  28. The following sequence works with any ANSI standard terminal.
  29.                     4  (number of codes to follow)
  30.                    27
  31.                    91
  32.                    50
  33.                    74 
  34.  
  35. With some computers, the terminal can be optionally defined to conform
  36. to the ANSI standard. 
  37.  
  38. If the codes you use are not correct, you will notice when running FILEBASE
  39. that the screen is not properly cleared.  Either obtain the correct 
  40. numbers or delete the FBCLRSCR.CDE file and FILEBASE will revert to the 
  41. scrolling method.
  42.  
  43. Registered users can call EWDP for the correct codes for each computer.
  44. Upon registration, the clear-screen code file specific for the computer
  45. will be included in the update disks sent.
  46.  
  47.  
  48. SAMPLE FILES
  49.  
  50. Sample data files and corresponding prompt files to be used for
  51. familiarization with program functions are:
  52.  
  53. Data file                Prompt File               Comment
  54.  
  55. INFILE1                  INFILE1.PMT               Names & addresses
  56. INFILE2                  INFILE2.PMT               Names & addresses
  57. LISTC.FXD                LISTC.PMT                 Names & addresses
  58. CHECKS.DTA               CHECKS.PMT                Check Register data
  59. ARTICLES.FXD             ARTICLES.PMT              Article references
  60.  
  61. The contents of the data files may not correspond exactly field
  62. for field with the printed versions used in the Tutorial Section
  63. of the Manual.  They may vary for illustrative purposes.
  64.  
  65. INFILE1 and INFILE2 can be used with all menu opitions with the exception
  66. of Option 9 - Update.   Option 9 requires a one-time conversion to
  67. fixed length records.  This can be performed with Option 10 or as
  68. part of a sort or select operation with Options 1, 2, or 3.
  69.  
  70. The two files can be merged into one because they have the same
  71. number of fields and the same kind of logical information in each
  72. of the corresponding fields.  That is, field one is a fullname in
  73. each file, field 2 is a last name, etc. etc. and field 6 is a 
  74. numeric quantity which the prompt file defines as CONTRIBUTION.
  75.  
  76. LISTC.FXD is identical in format to the first 2 except that it has
  77. already been converted to fixed length records and can be used
  78. immediately with Opition 9 for random access, search, and to 
  79. change information such as a new address.
  80.  
  81. CHECKS.DTA is also a fixed record length file and is a typical
  82. check register layout.  It can also be used to illustrate the
  83. 14-column summary profit and loss statement generated by the
  84. PROFLOSS program.  EXPENSE.CAT is the expense categories
  85. file as desribed on manual pages 72-74.
  86.  
  87. ARTICLES.FXD is a file suitable to serve as an example of print
  88. capabilities on longer text fields such as TITLE and SYNOPIS
  89. within this sample.  The LFS (LABEL FORMAT TO SCREEN) and
  90. TBF (TABULAR BLOCK FORMAT) within Option 4 would be illustrative
  91. of the word-wrap capabilites in these report styles.   
  92.  
  93.  
  94. DESCRIPTION
  95.  
  96. FILEBASE files consist of "comma delimited field records".  A record
  97. is a group of related items of information (fields)  - one person's
  98. 'name,street,city,phone' would be a record with 4 fields.  Each item
  99. of information (name) is automatically separated from the next
  100. (street) by a special comma separator.  You will not see the commas or
  101. be concerned about them.  The importance of this method is that items
  102. of information can vary in length within each field and from record to
  103. record.  Most other data managers separate fields from each other by
  104. setting aside a certain number of character positions for each field.
  105.  
  106. These files can be used directly with most letter-merge software such
  107. as MailMerge, Multimate, Word Perfect, Word, and others. Even pre-
  108. existing comma delimited field record files can be processed directly
  109. no matter how they were created. For example, dBase-II can make a copy
  110. of its fixed length field files in comma delimited form.  Pre-existing
  111. block format field records can be converted to comma delimited.
  112.  
  113.  
  114. FILE COMPATIBILITY
  115.  
  116. There is high degree of compatibility with programs written in BASIC.
  117. This means that if you program in BASIC, the files that were created
  118. with FILEBASE can be used by your programs.  The data manager will
  119. perform all the necessary processing so that you are not burdened with
  120. writing input, update, sort, select, and other manipulation routines.
  121.  
  122.  
  123. APPLICATIONS
  124.  
  125. FILEBASE is ideal for mailing lists, literature citations, membership
  126. data, client lists, parts lists, keyword information and a host of
  127. other applications because it can create and process items of
  128. information even if they vary considerably in length from record to
  129. record.  You do not have to worry about how much space to allot for
  130. every item of information as you do with other data managers. You can
  131. enter long lines of information (up to 255 characters per field) and
  132. output such information without it running off the paper or looking
  133. odd on the screen.
  134.  
  135. FILEBASE can be used for mailing lists with great flexibility.  Lists
  136. with up to 40 items of information in each record can be produced and
  137. any item can be selected for printing labels or envelopes, or line
  138. listings including those that may have non-address type information
  139. such as "identification number", "chapter & year", etc.    FILEBASE
  140. even sorts on the last name part of a full name field or a five digit
  141. zip code part of the address line.  There are features that print any
  142. number of lines in 'label format' to use for bins, boxes etc.
  143.  
  144.  
  145. FILEBASE VS. FIXED LENGTH FIELD DATA MANAGERS
  146.  
  147. There is an important difference between FILEBASE and classical data
  148. management systems.  Other systems require the user to pre-define a
  149. formal structure for a file such as number of fields, their type and
  150. length. Unless the definition has been very well pre-defined, some
  151. field lengths may prove excessive (wasting disk space) and others too
  152. small not allowing all data to be entered.
  153.  
  154. FILEBASE permits field lengths to vary and maintains random access
  155. capability by means of a fixed total record length which can easily be
  156. modified at any time without affecting individual fields. A formal
  157. file structure is not necessary which makes it very easy to set up a
  158. file.  You need not figure out in advance how long each field has to
  159. be.  FILEBASE actually helps you to decide on an optimal record length
  160. after you enter records.
  161.  
  162. When you create a file, records keyed in are variable length until
  163. converted to fixed length which is required to use one particular
  164. FILEBASE option.  After you have made a reasonable group of entries
  165. into the file and decide to convert to fixed lengths,  the program
  166. will tell you the length of the longest record up to that time.  This
  167. will help you to decide on a proper fixed record length.
  168.  
  169. Even if, after converting to fixed length, you come across an
  170. unusually long entry, you can easily handle it by changing to a longer
  171. record length.  Once you convert to fixed length, or re-convert to a
  172. longer length, the program will automatically keep new records the
  173. same by padding them with blanks on the right side of the record. You
  174. need not be concerned about the length of data you put into fields.
  175.  
  176.  
  177. FEATURES
  178.  
  179. Files can be sorted, or sort/merged into one or separated into logical
  180. subsets by various methods.  Records can be located by a host of menu
  181. driven methods including the familiar logical comparators (EQ, GT,
  182. etc.), by searching for words or parts of words, or by record number
  183. methods.  Fields can be dropped, rearranged or new ones added.
  184.  
  185. Records can be printed individually or in logical groups continuously
  186. or with pause for paper or label or envelope change. Format it to any
  187. size label, index card or on whatever you can put into the printer.
  188. Print line listings or fields under each other (sort of label format).
  189. Print with or without field prompts, with or without record numbers
  190. and add keyboarded comments to be printed.  Change the information in
  191. the fields and print the record at the same time, any number of times,
  192. in any number of different formats to get what you want at the time.
  193.  
  194. There is comprehensive error trapping with immediate feedback for
  195. unacceptable responses to prompts.  Presence or absence of files is
  196. verified and existing files are prevented from being accidentally
  197. overwritten.
  198.  
  199.  
  200. STARTING FILEBASE
  201.  
  202. With the FILEBASE disk in the logged-on drive, just type FILEBASE,
  203. select an option from the menu, and answer the ensuing prompts.
  204.  
  205. Only those prompts are presented which relate directly to the
  206. currently selected menu choice.  Their sequence follows a logical
  207. pattern which is easy to follow and understand.  Most functions of
  208. FILEBASE can be used without reference to the manual.
  209.  
  210. However, the manual includes a step-by-step tutorial that illustrates
  211. each of the prompts in their order of occurrence.  It is intended to
  212. be used during actual processing of either your files or the practice
  213. files that are on the FILEBASE disk.  All possible responses are
  214. outlined together with an explanation of the ramifications of each
  215. valid choice.  In addition to a discussion of what you can do, there
  216. is frequently an explanation of how FILEBASE will handle your
  217. instructions.
  218.  
  219. The tutorial follows the logic of the program because it was prepared
  220. using actual portions of the source code.  Whenever the program
  221. branches to a subroutine, so does the explanation.  In fact, the
  222. actual source code was word processed to extract the prompts and
  223. convert them to bold print and to additionally flag them with an
  224. asterisk.
  225.  
  226. FILEBASE is not only menu and prompt driven but it has  comprehensive
  227. error trapping. For example, invalid characters in user entered file
  228. names are located at the time that the name is entered.  Existence of
  229. input files is verified and output file names are checked to guard
  230. against existing ones from being overwritten.  Input file names are
  231. checked against output file names and inappropriate entries result in
  232. immediate feedback.  All replies to prompts are verified for
  233. acceptability as soon as they are entered.  Repetitive operations use
  234. a single keystroke (return not required). Lower or upper case can be
  235. used in reply to most prompts.
  236.  
  237. If you use an existing file, FILEBASE will find out how many fields
  238. there are in the records. It is not necessary for you to remember the
  239. number of fields or their sequence before you start. FILEBASE will
  240. display as many records as desired with each field numbered so that
  241. you can decide what fields to use for the various processing options.
  242. If you decide to merge two files, FILEBASE will tell you if the number
  243. of fields in the two files are the same.  It will tell you whether the
  244. file you are processing is comprised of fixed length records or
  245. variable length ones, how many records there are, and the length of
  246. the longest record.
  247.  
  248.  
  249. CREATING A NEW FILE
  250.  
  251. You can create a new file, decide on how many fields (items of
  252. information) it will have (up to 40), and assign names to be displayed
  253. as prompts for date entry.   Designate a file name. Blank fields are
  254. displayed so that you can assign prompts (field names) to be used for
  255. data entry. During the data entry process, the prompts assist in
  256. entering information.  See page D-14 under GLOBALS for codes you can
  257. assign to represent repetitive items of information.
  258.  
  259. When you are through entering data, prompts can be stored under any
  260. file name you assign. To differentiate prompt files from data files,
  261. one can use the name of the data file but have the suffix something
  262. like .PMT.  Prompts can be recalled for use in appending data to this
  263. or any other file that has the same fields in the same sequence.
  264.  
  265. When you create a file and key in records, they will be variable
  266. length ones.  Each will be only as long as the characters you keyed
  267. (plus comma delimiters added by the program). After keying in a group
  268. of records, FILEBASE will be able to tell you the length of the
  269. longest record up to that point and allow you to make and informed
  270. judgement on what length to use when converting to fixed.  You do not
  271. have to decide on individual field lengths.
  272.  
  273. The general concept of maintaining files is that once the file has
  274. been converted to fixed record lengths, it becomes the master file
  275. with the records kept in what is referred to as "arrival sequence".
  276. If a sorted report is needed, the file is sorted to an output file to
  277. be used for the report.  To save disk space, one can output variable
  278. length records.  The sorted file can be held until new records which
  279. are added to master file make the sorted file obsolete.
  280.  
  281. The process of creating a new file is so simple (because a formal
  282. structure with field lengths and types is not needed), that one can
  283. easily setup temporary files to later be merged with more permanent
  284. ones.  For example, when new FILEBASE users are entered into a file,
  285. it is a new one created weekly to be merged later into the master.
  286.  
  287. Creating a new file is so easy that it even is worth while to create a
  288. new file for just one record.  How about the name and address of your
  289. mortgage company if they do not provide self addressed envelopes.
  290. Enter the one address (or others if applicable), then use Option 4 to
  291. print 12 copies of each record on business envelopes.  Give the tab
  292. position as 48, number of lines to skip as about 10, and insert the
  293. envelope to the desired depth.  The address will print and eject
  294. because of the 10 line feeds. You can have a years worth of envelopes
  295. for each address entered in less than 5 minutes.
  296.  
  297. The file you create is not cast in concrete so you do not have to plan
  298. for every eventuality.  Later, if you discover a new field is needed,
  299. add it with Option 5, fill it in with data with Option 8 or 9 and you
  300. can also move it to a different spot in the record with Option 8 and
  301. at the same time drop fields you no longer need.
  302.  
  303.  
  304. CONVERSION TO FIXED LENGTH RECORDS - Fields Remain Variable Length
  305.  
  306. OPTION 10 is a direct method for converting variable length records to
  307. fixed for use with OPTION 9-UPDATE & SEARCH.  Options 1, 2 or 3 can
  308. also output fixed length, however these 3 can also convert fixed back
  309. to variable as well.  The latter could be useful if, after having
  310. converted to fixed length you find that a shorter length would
  311. suffice.  You first convert your fixed length records back to variable
  312. and then convert back to a shorter fixed length.  If you have no
  313. reason to sort, use OPTION 2 because it will be faster.
  314.  
  315. If select/exclude testing is not required and you wish to output the
  316. entire file of  records,  specify a test that is sure not to exclude
  317. any records but will serve merely to change record lengths. (Ex. Test
  318. against a LAST NAME field and EXCLUDE if EQ 'ZZZZZZ').
  319.  
  320.  
  321. UPDATING RECORDS
  322.  
  323. If you've processed a file using options 1, 2 or 3 or 10, and output
  324. fixed length records, you can update or search the information in that
  325. file with random access by record number or by key value.
  326.  
  327. The file must contain at least 2 records for FILEBASE to insure that
  328. it is indeed a fixed length records file.  With only one record the
  329. program assumes that the file is a variable length one and will return
  330. to the main menu.
  331.  
  332. FILEBASE will display the contents of the fields numbered so that you
  333. can assign prompts to assist you in altering field contents.  Prompts
  334. already stored in a file from a prior run, can be recalled for use.
  335. You can select one field at a time (ex. last name) to produce an index
  336. to access records by means key value entry.
  337.  
  338. Retrieved records can be printed and any of the field contents
  339. changed.  Choices for printing include TAB position, number of lines
  340. to skip between each  and addition of a keyboarded comment.
  341.  
  342. Accessing records can begin as soon as the prompts are available
  343. either by recall from a file or by assignment.  The update process is
  344. by record number or by key.  If by number, you enter a relative record
  345. number.  That record is retrieved from its position in the file and
  346. displayed for changes or printing.  If by key, you get a menu of
  347. comparators followed by a prompt to enter a key value.  The choice of
  348. comparators will be the usual ones (Greater Than, Less Than, Equal To,
  349. Between, etc.) and will include two for string searching.
  350.  
  351. When changing field contents, FILEBASE will insure that the sum total
  352. of the altered field contents plus delimiters plus quotes is not
  353. greater than the length of the other records in your fixed length
  354. file. If the record is too long, you will be advised of how much to
  355. shorten it before it can be written to the file.  You could abbreviate
  356. the contents of any of the fields to accommodate to the maximum length
  357. of the record or you could convert to longer record length.
  358.  
  359. If you know in advance that the updating will cause records to be
  360. longer than the present fixed length will permit, you can first use
  361. OPTION 10, 1, 2, or 3, any of which will allow you to duplicate your
  362. file specifying a greater record length.  If you have no reason to
  363. sort or select or exclude records, the fastest conversion process is
  364. with Option 10.
  365.  
  366. With fixed length records files, you can move directly to Option 7 -
  367. APPEND, without returning to the main menu.
  368.  
  369.  
  370. MORE ON CONVERTING TO FIXED LENGTH RECORDS WITH OPTION 10
  371.  
  372. FILEBASE  converts variable length records to fixed length records by
  373. padding blanks to the right side of the record so that FILEBASE option
  374. 9 can utilize the file for random access.
  375.  
  376. Random access is a method to retrieve a record from its position by
  377. going directly to it as opposed to starting at the beginning of the
  378. file and reading records until the right one is reached.  If all the
  379. records in a given file are the same length, the operating system of
  380. the computer combined with the disk controller can calculate any
  381. record's physical position by means of a relative record number.
  382.  
  383. FILEBASE implementation of this concept is different from most data
  384. management systems in that you do not have to pre-define field lengths
  385. by a "best guesstimate" of how wide they should be to accommodate the
  386. longest entry that might ever be made into that field.  Unless these
  387. lengths have been very well pre-defined, some may prove excessive
  388. (wasting disk space) and others too small (restricting the number of
  389. characters that may be entered).
  390.  
  391. FILEBASE permits field lengths to vary and maintains random access
  392. capability by means of a fixed total record length which can easily be
  393. modified at any time without affecting individual fields.  You do not
  394. have to sit down and try to figure out in advance how long each field
  395. has to be. FILEBASE actually helps you to decide on an optimal record
  396. length after you have entered records.
  397.  
  398. When you create a file, records keyed in are maintained as  variable
  399. length ones until you decide to convert them to fixed length.   After
  400. you have made a reasonable group of entries, you can use this option
  401. to convert the records to fixed length.  The program will report the
  402. length of the longest record to help you to decide on a total record
  403. length.   After converting to fixed length, even if you come across an
  404. unusually long entry, you can easily handle it by using this option to
  405. change to a somewhat longer record length.  Once you convert to fixed
  406. length, or re-convert to a longer length, the program will
  407. automatically keep newly added records the same by padding them with
  408. blanks on the right side of the record. You never have to be concerned
  409. about the length of data you put into individual fields.
  410.  
  411. Option 10 will tell you the length of the longest record and  will
  412. permit you to select any length equal to or greater than the  longest.
  413. Your  choice  will depend on how confident you are that the number  of
  414. records  entered  is  sufficient  to  base  your  judgement   on.    A
  415. comfortable  decision would be to ask for a length that is about 10 or
  416. 20  longer than the longest record.
  417.  
  418. Records will be converted to fixed length and output to a new file.
  419. The input file many already be fixed length and this option can be
  420. used to increase its length, however the length cannot be decreased
  421. unless you first remove the blanks with Options 1, 2 or 3.
  422.  
  423.  
  424. RECORD COUNTING AND RECORD LENGTH CHECKS
  425.  
  426. FILEBASE can process comma delimited field records (Mailmerge and
  427. BASIC format) without need to create a special structure.  Also,
  428. FILEBASE created files have no header records as do some other data
  429. managers. This is to keep the files directly compatible with
  430. MailMerge, MultiMate, Word and other word processors with letter-merge
  431. capabilities, as well as with dialects of BASIC.
  432.  
  433. With most data managers there is a header record or structure file
  434. keeps track of the record length, number of fields, and number of
  435. records in a given file.  Data managers that use header records can
  436. immediately determine the properties of the file by reading the
  437. header.
  438.  
  439. Some main menu options require checking the properties of the file.
  440. Since FILEBASE files do not have header records, the properties of the
  441. file must be learned by direct examination.  For some options, this
  442. requires checking record lengths and counting them.
  443.  
  444.  
  445. RECORD DELETION - General
  446.  
  447. Most data managers delete records by marking them with a special
  448. delete marker.  The record is not physically removed from its position
  449. in the file but the data manager recognizes the marker and ignores the
  450. record when printing reports and other processes.  Some programs
  451. automatically re-use deleted records by writing newly entered ones
  452. over the deleted ones.  Others, physically remove the records with a
  453. process that may be called 'file maintenance' or 'pack operation.'
  454.  
  455. Such processes actually copy the file to a new file name, leaving out
  456. records with the delete marker.  The old file is then automatically
  457. deleted and the new one renamed with the original file name.  This
  458. process tightens up the file by eliminating the existence of 'deleted'
  459. records and may be totally transparent to the user.
  460.  
  461. Some word processors also function in this manner.  In the case of
  462. WordStar, the old file is renamed with the file type .BAK and the
  463. newly re-written file receives the original file name.
  464.  
  465.  
  466. Record Deletion with FILEBASE
  467.  
  468. Because the FILEBASE concept of data management requires that files be
  469. in pure data format so they can be used without modification by other
  470. programs, embedding delete markers to records is not provided for.
  471. While delete markers are recognized by the data manager using them,
  472. they are totally foreign to other programs and may interfere with the
  473. proper use of the files.
  474.  
  475. Deleting records from FILEBASE files can be performed by one of two
  476. methods.  For an occasional delete in a fixed length records file, one
  477. can simply access any record no longer needed and filling in the
  478. fields with information from any new entry that is to be made.
  479.  
  480. However, the principal method would be to use Option 2 to exclude them
  481. from a newly written file.  This process is analogous to a 'file
  482. maintenance' step or 'pack operation' with other programs.  With
  483. FILEBASE it is a conscious and observable process.
  484.  
  485. The exclude process with Option 2 can be based on the LS-List of
  486. Record Number technique or by changing some field (in the records to be
  487. deleted) to some unique value.  For example, the first field of each
  488. record to be deleted can be changed to the word DELETE.  Using the
  489. Field Test method within Option 2, EXCLUDE all records EQ DELETE from
  490. the new file.   If MYFILE has records with the first field bearing the
  491. word DELETE, and MYFILE2 is named as the output file, do a test on
  492. field 1 and EXCLUDE if EQ DELETE.  To confirm that only deleted
  493. records were truly excluded, name a rejected records file.  All
  494. excluded records will be written to that file.  Look at that file for
  495. confirmation.
  496.  
  497. With the LS-List of Record Numbers technique, first identify the
  498. record numbers to be deleted by using Option 4 and then enter them
  499. into the exclude list.  See the manual for the LS technique.
  500.  
  501.  
  502.