home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol061 / dinstall.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  37.0 KB  |  783 lines

  1. 
  2. .op
  3. .he DIMS Installation Notes - Release 1.0                            page #
  4. .po 13 ..adj margin 
  5. ..----!----!-------!----------------!----------------!-----------------------
  6.  
  7.  
  8.  
  9.             DIMS INSTALLATION NOTES AND OPERATING INSTRUCTIONS
  10.  
  11.                                by Dan Dugan
  12.  
  13.                                 Release 1.0
  14.  
  15.  
  16.                              TABLE OF CONTENTS
  17.  
  18. INTRODUCTION:  FEATURES AND LIMITATIONS
  19.  
  20. INSTALLATION -- before you can use it
  21.  
  22.     BASIC VERSION DIFFERENCES
  23.  
  24.     MEMORY REQUIREMENTS
  25.  
  26.     MODIFYING THE PROGRAMS FOR YOUR TERMINAL AND PRINTER
  27.  
  28.     PLACING THE FILES ON THE APPROPRIATE DRIVES
  29.  
  30.  
  31. OPERATING INSTRUCTIONS
  32.  
  33.     NO-FILE MENU
  34.  
  35.     DEDIT COMMANDS
  36.  
  37.     TRANSIENT COMMAND PROGRAMS
  38.  
  39.     FILE STYLES
  40.  
  41.     DESIGNING AND CREATING SCREEN/PRINTER FORMATS
  42.  
  43.     CRASH RECOVERY
  44.  
  45.  
  46. INTERFACE AND MODIFICATION
  47.  
  48.     FILE COMPATIBILITY
  49.  
  50.     WRITING YOUR OWN 'TRANSIENT' PROGRAMS
  51.  
  52.     MODIFICATION GUIDELINES
  53.  
  54.     KNOWN BUGS AND SUGGESTED IMPROVEMENTS
  55.  
  56.  
  57. APPENDIX
  58.  
  59.     HISTORY OF DIMS
  60. .HE DIMS - Release 1.0 - INTRODUCTION                              PAGE #
  61. INTRODUCTION - FEATURES AND LIMITATIONS
  62.  
  63.     DIMS is a set of Basic programs that chain together automatically to 
  64. create a versatile list-managing system.  It has been proven under pressure 
  65. to be suitable for serious medium-scale (hundreds to thousands of names) 
  66. mailing-list operations, inventories, indexes, ledgers, etc.  It must be 
  67. installed by a Basic-80 programmer and can be used successfully by almost 
  68. anybody.
  69.  
  70.     File records can be either 128 bytes long with up to 15 fields or 256 
  71. bytes long with up to 30 fields.  Within each record the fields are of 
  72. random length.  An indicator appears to show how much space is left when 
  73. length limits are being approached.  New records are added to the end of 
  74. the file.  Records may be deleted, but record numbers stay the same until 
  75. the "renumber" command is used.  When updating records the old data is 
  76. shown field by field and may be kept or replaced.  All data files are 
  77. automatically kept in duplicate on two different disks.  When a record is 
  78. updated it is automatically updated on both disks.  It is difficult to lose 
  79. a DIMS file.  The files can be scanned with the CP/M "type" command.  
  80. Except for temporary files kept during operations like sorting, there are 
  81. no index files.
  82.  
  83.     I recommend that besides the distribution master, you keep a set of 
  84. disks called "Dims Development" which consists of all the release files, 
  85. the demonstration files, and small samples of the data files you create.  
  86. Then use this set of disks to create and test formats and your own 
  87. transient utilities on.  Then have sets of working disks, which will be 
  88. changed in pairs, with just the dims components you need and plenty of 
  89. space for data files.  With three disks I use A for everyday program 
  90. library and B and C for data, B & C getting changed for different sets of 
  91. files.
  92.  
  93.     The files can be searched rapidly for a literal substring anywhere in 
  94. the record, or more slowly for up to 10 selection keys in specific fields 
  95. and up to 10 rejection keys in fields.  A subset of records so selected may 
  96. be written out to another DIMS file, or to a standard Basic sequential data 
  97. file for use by other programs.  A standard Basic sequential data file from 
  98. any source may be added onto a DIMS file.  A quite flexible multi-key 
  99. sorting command is included which can sort a whole file or a range of 
  100. records within it.  The sort output may be overlaid on the original file or 
  101. sent to a new file.
  102.     
  103.     File size is limited only by disk space.  The DIMS "sort" command is 
  104. limited by the memory space used by its key array, which depends on the 
  105. size of the desired keys and the number of records.  Where there are 
  106. thousands of records or long keys an external sorting utility may be 
  107. needed.
  108.  
  109.     Complete screen and printer form design is provided for.  Scrolling or 
  110. stationary (one record per screen) forms may displayed.  More than one form 
  111. may be designed for a file and you can switch between them with a two-word 
  112. command.  At any time any fields may be hidden.
  113.  
  114. .pa
  115.     Most operations include self-explanatory dialogue.  In the file editor 
  116. DEDIT.BAS several screens of help text may be displayed with the command 
  117. "help."  At the pause prompt "Ready>" a list of the options there is shown 
  118. in response to "h".
  119.  
  120.  
  121. .he DIMS Installation Notes - Release 1.0 - INSTALLATION             page #
  122. INSTALLATION
  123.  
  124. BASIC VERSION DIFFERENCES
  125.  
  126.     There are two critical differences between Microsoft Basic-80 version 
  127. 4.5 and 5.x.  One is that the CLEAR statement has changed syntax.  This 
  128. statement is used once, in the main menu program DIMS.  If you are instal
  129. ling with 4.5 use "CLEAR 1000" which sets string space.  If you are using 
  130. version 5.x, use "CLEAR,,1000" which sets stack space.  In 5.x string space 
  131. is used dynamically, but the stack space is determined from an algorithm 
  132. which will result in DIMS crashing with an "Out of Memory" error which will 
  133. be puzzling because fre(x) will still show plenty of memory.
  134.  
  135.     The second difference is that Basic-80 version 5 has the command 
  136. "INKEY$" which allows checking the keyboard without stopping.  If you need 
  137. to install DIMS on version 4.5, you will have to either give up the "z" 
  138. scrolling control command, or write code that looks at your hardware ports.  
  139. Instead of X$=INKEY$ use X=INP(KEYBD.DATA.PORT).
  140.  
  141.  
  142. .he DIMS Installation Notes - Release 1.0 - MEMORY REQUIREMENT       PAGE #
  143. MEMORY REQUIREMENT
  144.  
  145.     DIMS is currently being developed on a 59K-size CP/M system, actually a 
  146. 62K Morrow hard disk system.  A smaller system may not have room for all of 
  147. the file editor DEDIT, which is big.  The program STRIP.BAS is provided and 
  148. may be used to remove comments from DEDIT.  It will then fit on a 54K 
  149. system.  If your system is smaller and you're adept at Basic, you could 
  150. shrink DEDIT by taking out all the code relating to the format command and 
  151. replacing all the complicated positioning code with simple listing in the 
  152. default format.  If you strip the comments keep your development version 
  153. with the comments in, and then strip it for running, so you'll have the 
  154. comments to guide you in making modifications.
  155.  
  156. .cp 4
  157. .he DIMS Installation Notes - Release 1.0 - TERMINAL AND PRINTER     PAGE #
  158. MODIFYING THE PROGRAMS FOR YOUR TERMINAL AND PRINTER
  159.  
  160.     DIMS uses the clear-screen and cursor positioning functions of your 
  161. terminal.  Since all terminals are different, ALL the DIMS programs must be 
  162. modified to suit yours.  In the code (TERM DEP) will appear in comments at 
  163. each place where customization is necessary, so you can use your text 
  164. editor to search for these spots.  DEDIT uses the most functions and there
  165. fore requires the most work.  The supplied transient programs don't use 
  166. cursor positioning but do use screen clear and keyboard testing.
  167.  
  168.     Special problems can arise in the case of an upper-case only terminal.  
  169. Copy all the program AND DATA files with PIP using the [u] option.  Then 
  170. use a text editor to find all CHR$( occurrences and change those numbers 
  171. which represent lower-case characters (97 to 122) to upper-case codes 
  172. (subtract 32).
  173.  
  174.  
  175. PRINTER
  176.  
  177.     The DIMS system as delivered is written for a Diablo 1610 or 1620 
  178. printer, and uses many of its special control sequences, like setting 
  179. vertical and horizontal pitch for listing in a pre-recorded form, and high 
  180. speed absolute tabbing.  Use with other printers will require re-writing 
  181. this code.  Diablo control sequences start with ESCAPE, which is CHR$(27).  
  182. DIMS will allow you to create a format specification which uses reverse 
  183. scrolling on the printer; don't do it unless you have a bidirectional forms 
  184. tractor.
  185.  
  186.  
  187. .cp 5
  188. .he DIMS Installation Notes - Release 1.0 - PLACING THE FILES        PAGE #
  189. PLACING THE FILES ON THE APPROPRIATE DRIVES
  190.  
  191.     After each program segment is checked over and modified for your termi
  192. nal, save it in the standard compressed format.  Then the .ASC file may be 
  193. erased.  Depending on how many drives you have, you must copy the 24 
  194. "working" files provided on the distribution disk to disks on the appro
  195. priate drives of your system.  Then change the initial value of the vari
  196. able NDRIVES near the beginning of DIMS.BAS to the number of drives you are 
  197. using.
  198.  
  199.     If you are using a hard disk, comment out the two RESET statements near 
  200. the top of DIMS.BAS.  They are necessary for changing floppies, which is 
  201. only allowed at the no-file menu.  DIMS runs much faster on a hard disk.
  202.  
  203. .cp 21
  204. IN A TWO DRIVE SYSTEM ... programs are split between A: and B:, attempting 
  205. to make balanced space for data (.D) and backup (.DD) files.
  206.  
  207.          Drive A:         Drive B:
  208.  
  209.          DIMS    .BAS     DCREATE .BAS
  210.          DEDIT   .BAS     DDOC    .BAS
  211.          SHORT   .DFO     DSORT   .BAS
  212.          SHORT1  .DFO     DLABELS .BAS
  213.          LONGADDR.D       DLETTERS.BAS
  214.          STANDADD.D       DSTAT   .BAS
  215.          SHORTADD.D       DCFORM  .BAS
  216.          ARTICLES.D       DHELP   .BAS
  217.                           DPUT    .BAS
  218.                           DGET    .BAS
  219.                           DHELP   .DOC
  220.                           ARTICLES.DOC
  221.                           LONGADDR.DD
  222.                           STANDADD.DD
  223.                           SHORTADD.DD
  224.                           ARTICLES.DD
  225.  
  226. .cp 22
  227. IN A THREE DRIVE SYSTEM ... the program library is kept together on A: and 
  228. B: and C: are saved for large data files.  A data file can be as big as the 
  229. whole user disk space, and still have 100% backup on the other disk.
  230.  
  231.          Drive A:         Drive B:         Drive C:
  232.  
  233.          DIMS    .BAS     LONGADDR.D       LONGADDR.DD
  234.          DEDIT   .BAS     STANDADD.D       STANDADD.DD
  235.          DCREATE .BAS     SHORTADD.D       SHORTADD.DD
  236.          DDOC    .BAS     ARTICLES.D       ARTICLES.DD
  237.          DSORT   .BAS
  238.          DLABELS .BAS
  239.          DLETTERS.BAS
  240.          DSTAT   .BAS
  241.          DCFORM  .BAS
  242.          DHELP   .BAS
  243.          DPUT    .BAS
  244.          DGET    .BAS
  245.          DHELP   .DOC
  246.          ARTICLES.DOC
  247.          SHORT   .DFO
  248.          SHORT1  .DFO
  249.  
  250. .cp 17
  251. IN A FOUR DRIVE SYSTEM ... auxiliary files (.DOC, .DFO and temporary .$$$) 
  252. are kept on the fourth drive.
  253.  
  254. Drive A:         Drive B:         Drive C:         Drive D:
  255.  
  256. DIMS    .BAS     LONGADDR.D       LONGADDR.DD      DHELP   .DOC
  257. DEDIT   .BAS     STANDADD.D       STANDADD.DD      SHORT   .DFO
  258. DCREATE .BAS     SHORTADD.D       SHORTADD.DD      SHORT1  .DFO
  259. DDOC    .BAS     ARTICLES.D       ARTICLES.DD      ARTICLES.DOC
  260. DSORT   .BAS
  261. DLABELS .BAS
  262. DLETTERS.BAS
  263. DSTAT   .BAS
  264. DCFORM  .BAS
  265. DHELP   .BAS
  266. DPUT    .BAS
  267. DGET    .BAS
  268.  
  269. .pa
  270. .he DIMS Installation Notes - Release 1.0 - OPERATING INSTRUCTIONS   PAGE #
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279. OPERATING INSTRUCTIONS:  MAIN MENU
  280.  
  281.     After the files have been put on the appropriate drives, modified for 
  282. your terminal and drive configuration, and saved in standard compressed 
  283. format (ASCII files won't CHAIN), the system is started by running DIMS.  
  284. You should get the no-file menu with a directory of the provided test data 
  285. files displayed.  If you then hit return, you will get menu choice no. 1, 
  286. open a file.  Enter the name of one of the existing files, just the main 
  287. part of the name, skipping the extension.  It may be in either lower or 
  288. upper case.
  289.  
  290.     DEDIT should load and display the last record in the file.  Type "help" 
  291. for a series of screens explaining the available commands.  At the "pause 
  292. prompt" "Ready>" if you type "h" a menu of pause options will appear.
  293.  
  294.     When you are editing a file the only safe exit is to type the command 
  295. "done" (don).  This will return you to the main menu.  Other choices 
  296. available from the no-file menu include a reset which is intended to show 
  297. the new directory when data disks have been changed.  If DIMS has been 
  298. properly installed (two RESET statements enabled), no harm will come if you 
  299. skip this step and open a file.  There is also a command for changing the 
  300. number of disks in the system for the current session.  This is for emer
  301. gency use.  It is necessary to first use PIP to move the files around to 
  302. the appropriate drives if you intend to do this.
  303.  
  304.     The no-file menu includes DCREATE, the sub-program that sets up a new 
  305. file from scratch.  It asks for the name, and choice of size.  128-byte 
  306. records are just right for mailing lists and most things;  the 256-byte 
  307. record size is available for records that need more space.  You are asked 
  308. to give the default 4-character name for each field, and whether it is an 
  309. alphabetic or numeric field.  You can just hit RETURN for alphabetic.  
  310. Everywhere in DIMS dialogues just hitting RETURN gives you the first choice 
  311. in the menu or options.  Enter "stop" when all fields have been defined, 
  312. and after approval the new file will be opened.
  313.  
  314.     If you want to make a new file with the same field scheme as an 
  315. existing one, there's an easier way.  Just open the file and copy one 
  316. record ("copy 1"), giving the new file name.  Then "done" the old file, 
  317. open the new file and use "change" to put in the new data.  Then you can 
  318. start adding.
  319.  
  320. .he DIMS Operating manual - Release 1.0 - DEDIT commands                PAGE # 
  321. FILE EDITING COMMANDS
  322.  
  323.     DEDIT has two prompts, "Edit FILENAME:" and "Ready>".  "Edit FILENAME" 
  324. is the command level, and accepts a command line.  "Ready>" is the "pause 
  325. prompt" between records in a sequence being run thru in response to a 
  326. command line.  The pause prompt "Ready>" takes single-letter instant com
  327. mands SPACE, z or ESC.  Hitting the space bar will show the next record.  
  328. Hitting z will set continuous display until space is hit to stop.  The 
  329. ESCAPE key will always quit the sequence and give you "Edit FILENAME".
  330.  
  331.     "Edit FILENAME" takes a somewhat free-form command line.  This line is 
  332. made up of only valid command words.  The sequence can be pretty loose, but 
  333. after a "final" command everything else will be ignored except for range-
  334. of-records words and numbers, like "from 10 to 20."
  335.  
  336.     If there's a record number or a pair of record numbers anywhere in the 
  337. command line, the command will be done on the specified range of records.
  338. The words "from" "to" "all" "end" "next" or "last" may be used when talking 
  339. about record numbers.  "." instead of a number means use the most recently 
  340. displayed record.  All the built-in commands may be shortened to three 
  341. letters.
  342.  
  343.     For example, all the following are valid commands:
  344.  
  345.                         add
  346.                         delete from 10 to 20
  347.                         delete 10 20
  348.                         print to 75
  349.                         print select labels
  350.                         change 57
  351.                         cha .  (means change last record shown)
  352.                         10 20
  353.                         list from 10 to 20 (same result as "10 20"
  354.                         select copy delete (moves records to another file)
  355.  
  356. "FINAL" COMMANDS
  357.  
  358.     These commands are normally the last word in the command sentence, any 
  359. following words except record numbers will be ignored.
  360.  
  361.         add     Appends records to the end of the file, prompting field by 
  362.                 field.  In this mode the following commands take effect:
  363.  
  364.                 "stop" alone in any field quits adding.
  365.                 "\"    (backslash) at end of any field skips back 1 field.
  366.                 ";"    alone in the field copies data from last record shown.
  367.  
  368.         done    Closes the file and returns to the no-file menu.
  369.  
  370.         goto <filename> Closes the file and opens any named file on the
  371.                 same disk.
  372.  
  373.         fields  Allows "hiding" fields you don't want to show.  You may un-hide
  374.                 them with the same command.  Controls output of 'put.'
  375.  
  376.         format 0      Installs default display and print formats.
  377.         formats       Shows available format definition files.
  378.         format <name> Installs named format definition for screen and printer.
  379.  
  380.         backup  Makes complete new backup file from main file.  Rarely used 
  381.                 since backup file is maintained automatically.
  382.  
  383.         renumber Renumbers all records sequentially from the top in both main 
  384.                 and backup files, closing up holes from deleted records.
  385.  
  386.  
  387. MISCELLANEOUS COMMANDS
  388.  
  389. The following commands may be given freely anywhere in the command line:
  390.  
  391.         change <#> Shows record or records field by field, new data may be 
  392.                 entered for each field or the old data may be kept by just 
  393.                 hitting RETURN.  To erase a field enter just one space then
  394.                 RETURN.  Backslash '\' backs up to previous field.  If a 
  395.                 change command includes more than one record, you will be 
  396.                 given the option to select fields to change, which speeds 
  397.                 up the process of doing something like just adding zipcodes 
  398.                 to an existing file.
  399.  
  400.         delete <#> Shows record or records and asks approval to erase.
  401.  
  402.         list    Shows records.  Assumed if no other final command is given.
  403.  
  404.         find <word> Finds records containing the exact word string.  A phrase 
  405.                 can be found if underlines_are_used_instead_of_spaces.
  406.  
  407.         select  Finds records containing up to 10 different words or 
  408.                 phrases.  Spaces are OK, but no upper/lower case conversion 
  409.                 is done.  If you hit return when asked what field to look 
  410.                 in the word will be searched for in all fields.  You also 
  411.                 can specify up to 10 words or phrases that will cause the 
  412.                 record to be skipped.  Design your coding system to work 
  413.                 with this. 
  414.  
  415.         print   Prints on list device rather than screen in the current format.
  416.  
  417.         copy    Copies data records and adds them on to the end of another
  418.                 DIMS file.  You will be asked for the name.  You may create a 
  419.                 new file this way or add to an existing one, but the field 
  420.                 definitions must be the same.  New records have no auto backup.
  421.  
  422.         and     Permitted for clarity, ignored.
  423.  
  424.         page    Sets the page number to start the printout with.
  425.  
  426.         margin  Sets the printer margin if you don't want the margin that 
  427.                 comes with the form you're using.
  428.  
  429.         flag    Combined with "add" or "change" to a range of records, asks 
  430.                 you for a string to be added automatically to any (one) 
  431.                 field in the record.
  432.  
  433.         programs  Shows a directory of available "transient commands," i.e. 
  434.                   various batch processes than can work on the file.
  435.  
  436.  
  437. .cp 4
  438. TRANSIENT COMMANDS                
  439.  
  440.     Transient commands are sub-programs which do a batch of work and then 
  441. return you to DEDIT.  Where appropriate, they will take a range of records 
  442. and selection criteria from the command line.  Example:  "print select 
  443. labels 100 to 150"
  444.  
  445.         cform   Process for creating format definition files.  Complicated.
  446.  
  447.         doc     A "notepad" where you can read or write notes associated with 
  448.                 the data file.  The doc file can be edited later with a 
  449.                 text editor.  Useful for documenting on the spot codes you 
  450.                 invent for your file.
  451.  
  452.         labels  Prints a batch of mailing labels (use "print labels") with 
  453.                 blank fields closed up.  Works only with three standard 
  454.                 address file formats.  It's not hard to modify if neces
  455.                 sary.  After the labels are aligned, hit space for each one 
  456.                 to check.  Then hit z to cause continuous printing.  Hit 
  457.                 space again to pause, ESC to abort.
  458.  
  459.        letters  Prints a text file with data from a DIMS file inserted.  
  460.                 A personal salutation line or other data lines may be 
  461.                 included if desired.  DLETTERS.BAS must be modified for 
  462.                 each job.  If you have MailMerge it's easier to use "put" 
  463.                 to make a sequential data file which is a subset of the 
  464.                 DIMS data file and use MailMerge with that.
  465.  
  466.         sort    Sorts the records into a new sequence in the whole file or 
  467.                 just a range of the file.  Asks questions for set-up. 
  468.                 Alphabetic keys may be truncated and/or blank-filled to a 
  469.                 specified length.  Sorts alphabetically unless all fields 
  470.                 specified for keys are numeric.  May overlay or make a new 
  471.                 file.
  472.  
  473.         stat    Computes descriptive statistics for a selected field.
  474.  
  475.         put     Makes an output file in standard Basic sequential form for
  476.                 further processing with other programs.  You may select a
  477.                 range of records in the invoking command line, and selection
  478.                 specifications.  Hidden fields (see "fields") will be 
  479.                 skipped
  480.  
  481.         get     Stuffs a conventional Basic sequential data file into
  482.                 the DIMS file from which it is called, adding records to
  483.                 the end.  Allows skipping and re-ordering of fields.
  484.  
  485.  
  486. .HE DIMS Operating Manual -- Release 1.0 -- FILE STYLES 
  487. FILE STYLES
  488.  
  489.     It's convenient to use one of three established sets of field names 
  490. when opening up a new mailing list file.  Look at the example files 
  491. provided, LONGADDR, STANDADD, and SHORTADD.  The transient command "labels" 
  492. has code built-in to deal with any of these three forms.  The long form is 
  493. used for government or academic work where titles and organizations abound.  
  494. The standard form is for general purposes.  The short form is friendly for 
  495. short files that won't need to be sorted into last name order.
  496.  
  497.     To make a special-purpose mailing list such as an organization which 
  498. would want membership status or other special fields, use the one of the 
  499. three standard field layouts for everything up to the zip code, then design 
  500. the layout beyond that point to suit the application.  This way the labels 
  501. program will work with the file.  The ZIP field is of the numeric type so 
  502. it will reject un-sortable mistakes like using "l" for "1".  Put European 
  503. and Canadian postal codes after the province in the C-ST field, and leave 
  504. the ZIP field blank.
  505.  
  506.     If code fields are compatibly designed, the limited selection/rejection 
  507. logic in DIMS can do quite a good job of pulling out a subset.  The 
  508. technique that I've developed that works real well is to use codes made up 
  509. of one lower-case letter and one digit, such as a0, a1, b0, c8, etc.  Any 
  510. number of codes can be jumbled in any order in a single code field.  This 
  511. makes it easy to add codes to the scheme as it develops - you can use the 
  512. "doc" command to note their meaning when you think them up.  If this form 
  513. of coding is strictly adhered to a subset of a single code may be pulled 
  514. very rapidly using "find," since this combination of letter and digit 
  515. doesn't occur anywhere else in the fields.
  516.  
  517.  
  518. .he DIMS Operating Instructions - Release 1.0 - SCREEN & PRINTER FORMATS  PAGE #
  519. DESIGNING AND CREATING SCREEN/PRINTER FORMATS
  520.  
  521.     You can create formats, that is, totally designed ways of naming and 
  522. displaying the data on the screen and on the printer.  Open the example 
  523. file SHORTADD and try the sample formats out on it.  You can see the 
  524. formats (.DFO files) provided by typing the command "formats" to see a list 
  525. of what's available, and then typing "format <name>" to load the desired 
  526. one.  
  527.  
  528.     A format is usually designed for use with a particular file, though if 
  529. the fields are compatible there's no reason why a whole family of files 
  530. couldn't use the same one.  A format specification includes both the screen 
  531. and the printer images.  You can design either scrolling or screen-oriented 
  532. forms.  The designers of commercial data-entry programs (DataStar, The Last 
  533. One) seem to be preferring screen-oriented displays these days, where the 
  534. screen shows you just one file record at a time displayed in a designed 
  535. form.  You can design fixed-position formats for DIMS.  I prefer scrolling 
  536. data entry because you can orient yourself to what you just did.  I haven't 
  537. used fixed-position format designs and consequently I must warn you that 
  538. though provided for in DIMS this mode hasn't been fully tested and there 
  539. are may be bugs.
  540.  
  541.     There are two ways of creating the format specification file, 
  542. <name>.DFO.  The first is to give the command "cform" in DEDIT.  The cform 
  543. transient allows you to print out a long paper form on which you fill out 
  544. your design for the screen and printer form.  Screen and/or page headings 
  545. may be made up to three lines long.  These lines will only be printed if 
  546. non-blank.  Field names (prompts) may be omitted, the default 4-character 
  547. field name may be used, or a custom name may be printed anywhere.  In 
  548. positioning names and data fields, if the line is specified the item will 
  549. always be printed at that line; if the line is 0 it will be printed wher
  550. ever the cursor or printhead was left by the last operation.  Similarly, if 
  551. a column is specified the data will be printed there, and if column 0 is 
  552. given it will follow the previous operation.  This allows, for example, 
  553. printing Firstname Lastname by defining the field name prompt for Lastname 
  554. as a single space, at line 0 and column 0.
  555.  
  556.     Take care when entering the data from the filled-out form, because 
  557. cform doesn't back up.  If you make an error start over.  Enter all the 
  558. specifications and test it on your data file.  When you're debugging a 
  559. format design, you can take a short cut by using a text editor program on 
  560. the .DFO file that cform created from the specification entry dialogue.  
  561. Compare the numbers on the paper form with the file image to figure out 
  562. where in the format control file you are.  The file is read as a sequential 
  563. file when it is used by DIMS, so take great care to preserve the exact 
  564. number of lines and items per line.    
  565.  
  566.     Trying to make the form creation process easier, I have developed an 
  567. alternate way to create .DFO files.  A WordStar file is edited to fill in 
  568. all the desired specifications, then printed to disk to create the control 
  569. file.  See FORMFORM.DWS for full instructions on this method.
  570.  
  571.  
  572. .he DIMS Operating Instructions - Release 1.0 - CRASH RECOVERY          PAGE #
  573. CRASH RECOVERY
  574.  
  575.     DIMS records every record that you enter or update immediately in two 
  576. places, the main and backup data files.  Hopefully your system will be set 
  577. up so that these are on different disks, giving protection against even a 
  578. crashed file directory on one disk.
  579.  
  580.     When a disk is bad and you crash to one of CP/M's cryptic "BDOS ERROR" 
  581. messages, all your data except the last record you were entering is still 
  582. good.  If you were in the process of adding records all the newly-added 
  583. records will be in the file but the number of records hasn't been updated 
  584. in the file header.  If you remember what the highest record number was, 
  585. skip the next paragraph.
  586.  
  587.     Use CP/M's stat utility to look at the data file.  Note the number of 
  588. records shown in the left-hand column.  If your file is 128-byte records, 
  589. the number of data records (the number you want) is that number minus one.  
  590. If the file is double-size records, the number of data records is the 
  591. number of CP/M records divided by two, then minus one.
  592.  
  593.     Re-start DIMS.  Open the file.  Note that DIMS still thinks that the 
  594. file has the number of records that it had when you did the last "done."  
  595. Hit control-C.  Enter "N=986" (use your own number).  Enter "C=1".  Enter 
  596. "cont" then RETURN and see if the file appears to be normal now.  Do 
  597. "done."
  598.  
  599.     If a crash occurs while the sort command is writing its output over the 
  600. backup file, the backup file is invalid.  Use "backup" to restore it.  
  601. Should the main or backup file be lost, PIP can be used to copy one or the 
  602. other, and then the CP/M "ren" command to rename the file.  The main and 
  603. backup data files are identical.
  604.  
  605.  
  606. .he DIMS Interface and Modification - Release 1.0 - FILE COMPATIBILITY  PAGE #
  607. INTERFACE AND MODIFICATION
  608.  
  609. FILE COMPATIBILITY
  610.  
  611.     DIMS files are ASCII data in fixed-length random access blocks, and all 
  612. records are either standard 128 byte length or 256 byte length depending on 
  613. which was chosen when the file was created.  This has nothing to do with 
  614. your disks being double or single density.  MBASIC and CP/M pack the re
  615. cords on the disk with no carriage returns between them and no control-Z at 
  616. the end.  Within each record the fields are jammed sequentially with the 
  617. delimiter character "~" (chr$(126)) between the fields and the left-over 
  618. space filled with blanks.  This character may not be used in data, but 
  619. commas and quotes may be entered freely.  Here is an example of what a file 
  620. record looks like on the disk:
  621.  
  622. (header record - the last item is the number of records in the file.)
  623.  
  624. LNAM,a~FNAM,a~N2  ,a~ADDR,a~C-ST,a~ZIP ,n~PHON,a~CODE,a~NOTE,a~stop0~ 1~
  625.  
  626. (data record 1)
  627.  
  628. Dugan~Dan~Dan Dugan Sound Design~833 14th Street~San Francisco, CA~94114~
  629. (415) 621-0781~~DIMS~
  630.  
  631.     The file may be dumped with the CP/M "type" command, or examined and 
  632. repaired with WordStar version 1 (version 3 will crash) in the non-document 
  633. mode.  Christensens's DU.COM utility may be used to repair a crashed file 
  634. with ease.  At the time of this writing SuperSort would not accept DIMS 
  635. files directly because it insists on comma-delimited or fixed-length field 
  636. files.
  637.  
  638.     The DIMS transient programs "DPUT" and "DGET" provide a convenient 
  639. means for interfacing to other programs.  DPUT outputs a standard Basic 
  640. sequential file of comma-delimited records.  It can be invoked in a command 
  641. line with range and selection commands to output a subset file, like 
  642. "select put."  DGET does the exact reverse, loading a standard sequential 
  643. file into a DIMS file, and allows stuffing the fields in any combination or 
  644. order.
  645.  
  646.     Quotes and commas may be used freely in DIMS files.  To make files 
  647. compatible with other programs, DPUT automatically puts quotes around 
  648. fields containing commas.  It encodes existing quotes in the file into the 
  649. character "~", CHR$(126).  DGET drops the surrounding quotes and converts ~ 
  650. back to ".
  651.  
  652.     A DIMS file may be re-designed by using the 'put' command to output the 
  653. data to a temporary file, using DCREATE (main menu) to create a new DIMS 
  654. file with the desired field names, and using the 'get' command to stuff the 
  655. data back in in the desired order.
  656.  
  657.  
  658. .cp 4
  659. WRITING YOUR OWN 'TRANSIENT' PROGRAMS
  660.  
  661.      What I usually do when I want to write a new transient function is 
  662. load "DLABELS.BAS" and then replace the working section (usually, just the 
  663. inside of the "I" loop) with new code that does what I want.  Then I save 
  664. the file with a new name.  Keep the beginning except for the questions and 
  665. whatever subroutines you need.  Remember that you enter a transient program 
  666. with the range of records, printing and selection criteria already speci
  667. fied from the DEDIT command line.
  668.  
  669.     Cautions -- Don't change the COMMON statement.  All DIMS programs are 
  670. entered at line 1000 except for the cold-start of DIMS.BAS.  DEDIT 
  671. automatically recognizes transient programs if they're on the right drive 
  672. and their names start with D and end with .BAS.
  673.  
  674.  
  675. MODIFICATION GUIDELINES
  676.  
  677.     Note that all GOTO's and GOSUB's point to remark lines!  This is the 
  678. opposite of advice commonly heard.  The speed penalty for this is infini
  679. tesmal.  The advantages are first you can see what GOSUB nnnn does by 
  680. typing "list nnnn," and second it's easier to add a line at the beginning 
  681. of the subroutine, something I seem to need to do often.
  682.  
  683.     Regarding speed, I read somewhere that Basic searches the whole program 
  684. from the start for the destinations of branching statements, and that it's 
  685. supposed to be faster if the subroutines are at the beginning of the 
  686. program.  I spent a few hours re-organizing DEDIT to try this, and it 
  687. wasn't worth it, the time for searching 100 records was the same.  I put 
  688. the subs back where they grew.  I've heard that the same goes for variable 
  689. storage, that those that are defined earlier in the run are quicker to use.  
  690. For this reason the common loop indexing variables are included in the 
  691. COMMON statement, though most of them aren't used for parameter passing.  
  692. Any can be.
  693.  
  694.  
  695. DEFINITION OF COMMON VARIABLES
  696.  
  697.     B$()    Array holds field data of current record
  698.     C       Flag: = 1 when the file has been added to
  699.     C()     Controls display and changing of fields, value 0, 1 or 2
  700.     DD$()   Array holds drive names for five types of files     
  701.     F$      Current file name
  702.     FT      Current file type, 1 or 2 - determines 128 or 256 byte recs.
  703.     FT$     Added to extension of file name, blank or 2
  704.     I,J,K   Loop index variables.  Be sure they're free before re-using.
  705.     LOOKFIELD() - Numbers of fields for which select skips are set
  706.     N       The current number of records in the file
  707.     N$()    Default names for fields, comma, and "a" or "n" for type
  708.     NC      The number of fields in the current file
  709.     P6      Flag, reserved for "write" function not implemented
  710.     P7      Flag, = 1 when "copy" in effect
  711.     P8      Flag, reserved
  712.     P9      Flag, = 1 when "print" in effect     
  713.     PI      Flag, = 1 when printer is assumed ready
  714.     R$      Disk data string read/written in main data file
  715.     S       
  716.     S$      Disk data string read/written in backup data file
  717.     SEARCHFIELD () - Numbers of fields for which select keys have been set
  718.     SEARCHWORD$() - Key words or phrases for record selection
  719.     SKIPWORD$() - Key words or phrases for record skipping
  720.     T       Set by some DEDIT commands to control branching
  721.     T$      Data record string going to or from storage
  722.     T1      Lowest record number in the batch
  723.     T2      Highest record number in the batch
  724.     T1$     Temporary data string
  725.     X,Y     Local parameter passing variables
  726.  
  727.  
  728. KNOWN BUGS AND SUGGESTED IMPROVEMENTS
  729.  
  730.     Display of non-scrolling forms in DEDIT hasn't been debugged.
  731.  
  732.     A harmless slightly garbled display happens if you use backslash to try 
  733. to back up from the first field of a record.
  734.  
  735.     The record selection logic is rudimentary, and could be improved to 
  736. include AND/OR and greater/less than comparisons.  This would require 
  737. adding some common variables and updating all programs in the system.
  738.  
  739.     "Undelete" would be easy to implement by getting data from the backup 
  740. file.  Lots of things could be added to DEDIT if it weren't so fat already.  
  741. When it's compiled...
  742.  
  743.  
  744. .he DIMS Installation Notes - Release 1.0 - HISTORY OF DIMS          PAGE #
  745. HISTORY OF DIMS
  746.  
  747.     I started with my S-100 microcomputer at the end of 1977.  At that time 
  748. there was no generalized data-base management program available.  I studied 
  749. a full-fledged system written in Basic called RISS which is published as a 
  750. book (by Meldman et al, Van Nostrand Reinhold Co. '78)  It was too complex 
  751. for me to understand.  I spun my wheels for a year until I saw an ad for 
  752. Scelbi Publications' PIMS -- Personal Information Management System.  This 
  753. is a complete functioning data-base manager for cassette-based computers 
  754. like TRS-80 or PET.  I bought it for $10, typed it in and got it to work.
  755.  
  756.     To backstep for a moment, this program was first published as "A 
  757. People's Data Base System" by Madan Gupta and Brent Lander in 1977.  Then 
  758. Scelbi published PIMS by Gupta in 1979.
  759.  
  760.     With PIMS I had a working framework which I converted to disk random-
  761. access files.  After that the program immediately went to work for me and 
  762. my clients, and just grew and grew as the pressure of doing real work 
  763. determined.  I rented machine time to the San Francisco Charter Revision 
  764. Commission for their mailing lists, and made many improvements to the 
  765. program as that project grew.  The system of chaining the transient pro
  766. grams developed when the program got too big to be all in memory at the 
  767. same time.  I have never changed the variable names, storage format or 
  768. default listing format from PIMS.  If you're a beginner you could buy PIMS, 
  769. get that up and then step up to DIMS.
  770.  
  771.     I've put my large personal address lists onto DIMS, and a very 
  772. successful system for indexing technical magazine articles.  A book, The 
  773. Hearts of Space Guide To Cosmic, Transcendent and Innerspace Music started 
  774. out as a DIMS data file, was transformed (by a purpose-built transient) to 
  775. WordStar when the data was complete, then sent to the typesetter on a CP/M 
  776. disk.  I also have parts lists for my products, the membership list and 
  777. financial records for my neighborhood association, and my financial trans
  778. action records.  All this activity made me want more real-time availability 
  779. of my data bases, and in '81 I used all my available credit to install a 
  780. Morrow M26 hard disk.  DIMS runs with a satisfying speed increase on the 
  781. hard disk.  In '81-82 pre-release versions were up on two systems in my lab 
  782. and five other CP/M systems belonging to friends.
  783.