home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / DOS / DATABASE / DBM112 / DBM.HLP < prev    next >
Text File  |  1995-05-01  |  40KB  |  1,238 lines

  1. <#>(PAGEMODE)
  2. ┌───────────────┐
  3. │ PageMode Keys │
  4. └───────────────┘
  5. Alt_H:     Help
  6. Alt_S:     Submenu for services on file,
  7.            search etc
  8. Alt_W:     Window edit/view mode
  9. Alt_T:     Toggle view/edit mode. When toggled
  10.            to viewonly mode, keys Alt_A,
  11.            Alt_D and Alt_R will lose effect.
  12. Alt_G:     Go a particular record
  13. Alt_A:     Append a new record at the end
  14.            of database (to insert at the
  15.            current record position, see
  16.            edit of submenu)
  17. Alt_D:     Delete current record
  18. Alt_R:     Recall deleted records
  19. Alt_M:     Mark area as scratch text
  20. Alt_E:     Escape: once to leave edit mode,
  21.            twice to quit completely
  22. Alt_X:     Brutal exit/abort
  23.  
  24. Alt_F:   First logical record
  25. Alt_L:   Last logical record
  26. Alt_P:    Previous logical record
  27. Alt_N:    Next logical record
  28. PgUp:     Previous page if available
  29. PgDn:     Next page if available
  30. ^Home:    First entry in current page
  31. ^End:     Last entry in current page
  32. Home:      Leftmost position
  33. End:       Rightmost position
  34. ^PgUp:     First page
  35. ^PgDn:     Last page
  36.  
  37. F1:        Help
  38. F2:     #  Check the relative cursor position
  39.            inside input buffer
  40. F3: Alt_W  Edit or view database in a
  41.            line-per-record mode.
  42.            Note that in the case of limit
  43.            being exceeded in 50 line mode,
  44.            for instance, a 25 line mode
  45.            may still be within the limit.
  46.            Momo edit has largest width in
  47.            the mode than in the other ones
  48. F4: Alt_M  Screen-Keyboard-Logfile swapping
  49.            utility
  50. F5:     ≈  Total number of filtered records,
  51.            with current record number
  52. F6:        Current date and time
  53. F7:       Workarea toggle
  54. F8:       Select a workarea
  55. F9:    «»  Browsing current all records
  56.            of current field, with search
  57.            algorithm
  58. F10:      Toggle specific filter provided by
  59.            the related print design file
  60. Alt_F10:!  Choose an external codeblock to
  61.            execute
  62. Alt_F1 - Alt_F9:
  63.            Special external codeblocks
  64. ^F1:       Text dump of non-memo fields,
  65.            reporting sum on each numerical
  66.            field at the end
  67. ^F10:      Call up or create a map, map
  68.            altered in non-edit mode will be
  69.            ignored
  70.  
  71.  
  72. ┌───────────┐
  73. │ Map  Keys │
  74. └───────────┘
  75. TAB:       Edit current map entry, or toggle
  76.            editing region
  77. CTRL_LEFT_ARROW:
  78. CTRL_INS:  Insert in front
  79. CTRL_RIGHT_ARROW:
  80. INS:       Insert in behind
  81. DEL:       Delete current entry
  82.  
  83. Browsing in map list supports entry search when in upper cases.
  84.  
  85.  
  86. ┌───────┐
  87. │ Mouse │
  88. └───────┘
  89. Left:    Pick item
  90. Right:   Return key
  91. Both:    Escape once
  92. (#)(PAGEMODE)
  93.  
  94.  
  95.  
  96. <#>(EDITDBAREA)
  97. ┌─────────────────┐
  98. │ WindowMode Keys │
  99. └─────────────────┘
  100. In this mode, each record is displayed in a horizontal line.
  101.  
  102. ENTER:     Edit/view current entry
  103. TAB:       Toggle automatic search mode.
  104.            If <seek off>, then an
  105.            unrecognised key will start
  106.            editing the entry immediately.
  107.            If in <keyseek> mode, then
  108.            instead the pressed key will
  109.            be searched from the current
  110.            field of all records.
  111.  
  112.            Upper case letters etc will
  113.            enable string search (with
  114.            SPACE BAR to restart search
  115.            string), while in other cases,
  116.            only letter searching is
  117.            performed.
  118. Alt_G:     Goto record by number
  119. Alt_I:    Select controlling index
  120. Alt_F:   ╬ Toggle filter mode
  121. Alt_T:     Toggle view/edit mode
  122. Alt_S:   * Search for a string
  123. Alt_=:        Mark (tag) current record for
  124.            duplication into others
  125.  
  126. F1:      ? Help
  127. F2:        Current cursor position, when
  128.            editing area is focused
  129. F3:      « Reverse search
  130. F4:        Area marking
  131. F5:      ≈ Record number report
  132. F6:        Current time and date
  133. F7:       Toggle workareas
  134. F8:       Select workarea
  135. F9:      » Forward search
  136. F10:      Toggle external filter
  137.  
  138. Alt_F10: ! Choose an external codeblock
  139.            to execute
  140. Alt_F1 - Alt_F9:
  141.            Execute special external codeblock
  142.  
  143. Following keys are active in edit mode only.
  144.  
  145. DEL:     - Delete record toggle
  146. INS:     + Insert empty record at the end
  147. ^ENTER:    Append tagged record at the end
  148. Alt_-:     Copy tagged record into current
  149.            record number, pushing all the
  150.            existing records behind by 1
  151. Alt_0:     Same as Alt_-, except empty
  152.            record is inserted
  153. (#)(EDITDBAREA)
  154.  
  155.  
  156. <#>(WINDOWSEARCH)
  157. ┌────────────┐
  158. │ Search Pad │
  159. └────────────┘
  160. EDIT STRING:
  161. edit a string to be searched
  162. MARK FIELDS:
  163. choose fields that are to be searched
  164. START SEARCH:
  165. search from top record
  166. CONTINUE SEARCH: (F9)
  167. search from next record
  168. REVERSE SEARCH: (F3)
  169. reverse search from previous record
  170. BOTTOM SEARCH:
  171. reverse search from bottom
  172. TOGGLE MODE:
  173. toggle search matchmode
  174. ■ Field Match
  175.     - match whole fields up leading
  176.       and trailing spaces
  177. ■ Substring Match
  178.     - match as a substring
  179. (#)(WINDOWSEARCH)
  180.  
  181.  
  182.  
  183. <#>(SCR_KEY_LOG)
  184. ┌──────────────┐
  185. │ Area Marking │
  186. └──────────────┘
  187. MARK AREA:
  188. use keys or mouse to mark an area and translate it into a string (more help later on)
  189. EDIT MARKED:
  190. line-edit the marked area
  191. ADD TO LOG:
  192. add marked area to a log buffer
  193. FLUSH AS KEYS:
  194. flush marked area as a character string into keyboard buffer (proceed with caution)
  195. REVIEW LOG:
  196. edit the log buffer
  197. SAVE LOG:
  198. save log buffer to a file
  199. NO LINEFEED:
  200. all lines in the marked area are linked directly
  201. WITH LINEFEED:
  202. each line in the marked area is added a CR-LF at the front before it is joined with other marked lines
  203. LOAD FILE:
  204. load a file into the log buffer
  205. DELETE LOG:
  206. delete current log buffer
  207. OUTPUT LOG:
  208. flush log buffer into keyboard buffer (proceed with caution)
  209.  
  210. NOTE:  Avoid marking controlling characters, as they will be most likely to be interpreted as the unwanted keys or actions should they are flushed as keys.
  211. (#)(SCR_KEY_LOG)
  212.  
  213.  
  214.  
  215. <#>(MARKAREA)
  216. ┌───────────┐
  217. │ Mark Area │
  218. └───────────┘
  219. VIA KEYS:
  220. Use array keys to move the initial position, then use CTRL_LEFT, CTRL_RIGHT, CTRL_UP/CTRL_PGUP and CTRL_DOWN/CTRL_PGDN to move to an end position. Any other key will mark the highlighted area unless ESC key is pressed.
  221.  
  222. VIA MOUSE:
  223. Click left button and keep it down while draging out a highlighted area. The area will be marked when you release the button. If in the middle of draging the mouse you want to restart with a new initial point, just click the right button while the left button is still being pressed.
  224.  
  225. Mouse has priority over keys: if an area is being marked via keys, then a valid mouse click will restart the marking process through the mouse.
  226. (#)(MARKAREA)
  227.  
  228.  
  229.  
  230. <#>(CREATFILTER)
  231. ┌───────────────┐
  232. │ Create Filter │
  233. └───────────────┘
  234. INS:     add a new field above
  235. TAB:     add a new field below
  236. DEL:     delete current field
  237. SPACE:   toggle in Mode column
  238. CR:      enter new data
  239. CTRL-CR: complete and return
  240. ESC:     restore last field filter
  241.          setting
  242.  
  243. Filter Mode:
  244. STR:     search for a substring
  245. FLD:     search for complete match
  246.          of a whole field
  247. BLANK:   current field is not active
  248.          in filtering records
  249. (#)(CREATFILTER)
  250.  
  251. <#>(CREATSTRUCT)
  252. ┌──────────────────┐
  253. │ Create Structure │
  254. └──────────────────┘
  255. INS:     add a new field above
  256. TAB:     add a new field below
  257. DEL:     delete current field
  258. CR:      enter new data
  259. CTRL-CR: complete and return
  260. ESC:     quit
  261. (#)(CREATSTRUCT)
  262.  
  263. <#>(MARKFIELDS)
  264. ┌─────────────┐
  265. │ Mark Fields │
  266. └─────────────┘
  267. INS:     mark all fields
  268. DEL:     unmark all fields
  269. SPACE:   mark/unmark current field
  270. CR,ESC:  complete and return
  271. (#)(MARKFIELDS)
  272.  
  273. <#>(QUERY)
  274. ┌───────┐
  275. │ Query │
  276. └───────┘
  277. Please answer accordingly.
  278. (#)(QUERY)
  279.  
  280. <#>(MESSAGE)
  281. ┌─────────┐
  282. │ Message │
  283. └─────────┘
  284. A message is meant to be a message.
  285. (#)(MESSAGE)
  286.  
  287. <#>(MEMOSHOW)
  288. ┌──────────┐
  289. │ Memoedit │
  290. └──────────┘
  291. Ctrl-W:   save and return
  292. ESC:      quit without save
  293.  
  294. ^BKSP:
  295. ^Y:       delete current line
  296. ^T:       delete word right
  297. Alt_Y:    delete the whole content
  298. Alt_U:    delete up (all previous text)
  299. Alt_D:    delete down (all following text)
  300. ^HOME:    beginning of current window
  301. ^END:     end of current window
  302. ^PGUP:    beginning of file
  303. ^PGDN:    end of file
  304.  
  305. HOME:     beginning of current line
  306. END:      end of current line
  307. ENTER:    beginning of next line
  308. ^A:       a word left  (^LEFT_ARROW)
  309. ^F:       a word right (^RIGHT_ARROW)
  310. ^N:       insert a line above
  311.  
  312. Alt_S:    edit search string and search forward
  313. Alt_F:    forward search
  314. Alt_R:    reverse search
  315. Alt_T:    toggle case/nocase in string search
  316. Alt_P:    toggle showing line/column position
  317. Alt_L:    length of current file buffer
  318.  
  319. Alt_I:    insert a file in edit mode
  320. Alt_W:    save to a file in edit mode,
  321.           otherwise is same as ^W in view mode
  322. F4:       mark and paste (avoid marking
  323.           controlling characters)
  324. (#)(MEMOSHOW)
  325.  
  326. <#>(INPUTFILENAME)
  327. ┌────────────────┐
  328. │ Input Filename │
  329. └────────────────┘
  330. Use ESCAPE to take the default name if you are in the browse state, press RETURN to confirm. If there are wild characters in the input name, a list of matched filenames will be given for selection.
  331.  
  332. PGUP:    page up
  333. PGDN:    page down
  334. HOME:
  335. ^PGUP:   first entry
  336. END:
  337. ^PGDN:   last entry
  338. ^HOME:   first entry in current window
  339. ^END:    last entry in current window
  340. (#)(INPUTFILENAME)
  341.  
  342. <#>(YESNO)
  343. ┌───────────┐
  344. │ Yes or No │
  345. └───────────┘
  346. Make your choice, ESC= default.
  347. (#)(YESNO)
  348.  
  349. <#>(GETVARIABLE)
  350. ┌───────────┐
  351. │ Line Edit │
  352. └───────────┘
  353. CR:    updates with new value
  354. ESC:   retains the old value
  355. (#)(GETVARIABLE)
  356.  
  357. <#>(ADDUPENTRY)
  358. ┌─────────────┐
  359. │ Edit Record │
  360. └─────────────┘
  361. CR in browsing mode updates the change.
  362. (#)(ADDUPENTRY)
  363.  
  364. <#>(CHOOSEINDEX)
  365. ┌───────┐
  366. │ Index │
  367. └───────┘
  368. Choose any field as the index key or edit the User Defined Index entry for  a combination of them.
  369. (#)(CHOOSEINDEX)
  370.  
  371. <#>(TWOCHOICE)
  372. ┌────────┐
  373. │ Browse │
  374. └────────┘
  375. Click the highlighted bar to make a choice.
  376.  
  377. When you are allowed to edit in a two-column mode:
  378. CTRL_LEFT_ARROW:
  379. CTRL_INS:          insert in front
  380. CTRL_RIGHT_ARROW:
  381. INS:               insert in behind
  382. DEL:               delete map entry
  383. TAB:               edit current entry
  384. (#)(TWOCHOICE)
  385.  
  386.  
  387. <#>(GENERAL)
  388. ┌─────────┐
  389. │ General │
  390. └─────────┘
  391.  
  392. DBM is designed to handle database in free format or user created format, and is particularly oriented to the management of database files with huge number of fields. DBM also carries a simple text editor.
  393.  
  394. DBM can be used to conduct daily business affairs or process questionnaires because it supports user-defined screen display via format file (*.DBM) and print and other tasks via print design file (*.DBP), along with translation maps (*.MAP) which can be dynamically constructed at the run time and display more meaningfully. However the contents of screen format files and print design files must be edited with care.
  395.  
  396. A format file (*.DBM) pin-points the places for (chosen) fields to be displayed. This way we may just display partially the database which is very useful to curb user's power to alter data unintentionally. Should format file contain certain fieldnames foreign to the related database, the format will not be used.
  397.  
  398. A map file (*.MAP) is a database with two character fields with the first field representing displayed "meaningful" string and the second field representing the actual storing string or translation.
  399.  
  400. A print design file (*.DBP) is another type of database file users can configurate themselves. It mainly contains the commands that will control the printing of the related database, i.e. print out what under what conditions. Print design file may also contain other external action commands which are related to the particular database file. These externally supplied action commands can be chosen arbitrarily for execution later on.
  401.  
  402. DBM can be run alone, or in combination with DBM.HLP and user created format (*.DBM, *.MAP, *.DBP) database files. Online help is available anywhere by pressing F1 key. If no particular help exists for that area, the nearest available help will be given.
  403.  
  404. Some nonimportant messages, particularly those in the brown color, will timeout themselves. If no keys are pressed, such messages will stay on screen for two seconds and then blink for another one and half seconds before they time out. To hold the message, press ^H before it times out. If any other keys are pressed before messages time out, the messages will disappear as if they are never there in the sense that the newly pressed keys will be processed by program as if the keys were pressed after the messages timed out.
  405.  
  406. DBM supports IBM 25x80, 43x80 and 50x80 screen modes. If you have a VGA monitor, you could even set it to 43x132 screen mode, though you would have to set it before using DBM. You may also disable unformatted editing by option "/!", so that the user is only allowed to view and edit pre-determined fields of the pre-given database files entered at the command line. Option /? will show you how to initiate them.
  407.  
  408. DBM also implicitly supports user added help. By editing DBM.HLP accordingly, user's own prompt help may be added. The online help will reformat the help message line by line to fit into the help window except for those whose lengths are no greater that the help window. If default help file DBM.HLP is not found in current directory, it will look for the file specified by the environmental parameter DBMHELPFILE, unless option /+helpfile is specified on the command line. If help is not available at one level, previous level of help will be displayed.
  409.  
  410. Should format or print design files adopt new database structures for newer version of DBM due to the extension, then the old files should be easily convertible to new forms (and vise versa) by just merging the old file into a new file created by the current version of DBM program via its submenu.
  411.  
  412. ┌──────────────────────┐
  413. │ Command line options │
  414. └──────────────────────┘
  415. DBM  [/?] [/25] [/43] [/50] [/c] [/cc] [/ccc]
  416.      [/a] [/b] [/d] [/m] [/n] [/w]
  417.      [/!] [/!!] [/la] [/lb]
  418.      [/l#] [/+help] [/:initial] [//f:num]
  419.      [dbfile,format,prndesign,index1,...] [...]
  420.  
  421. DBM  /ab|/ae textfiles [...] [/25] [/43] [/50]
  422.      [/c] [/cc] [/ccc] [/m] [/d]
  423.  
  424. /?         help on command line options
  425. /25        25 line screen
  426. /43        43 line screen
  427. /50        50 line screen
  428. /c         color monitor (default)
  429. /cc        color different from /c option only
  430.            in pagemode, useful for removing the
  431.            background-highlight effect
  432. /ccc       color choice in slightly altered
  433.            setting, useful for non-conventional
  434.            color monitors
  435. /a         date in American format mm/dd/yy
  436. /b         date in British format dd/mm/yy
  437. /d         disable mouse, useful if your local
  438.            mouse driver is unable to support
  439.            properly such as the 43x132 text
  440.            screen
  441. /m         monochrome monitor
  442. /n         no initial link via index or filter.
  443.            index/filter in pagemode will not be
  444.            passed on to windowmode initially,
  445.            unless it is been toggled explicitly
  446.            in the windowmode
  447. /w         display initially set to windowmode
  448. /ab        browse ascii text
  449. /ae        edit ascii text files
  450. /la        memoedit line length adjusted to
  451.            window size
  452. /lb        text edit with borderlines, when
  453.            combined with /ab or /ae option
  454. /l#        (40≤ # ≤250) line length set to #
  455.            characters (default #=250)
  456. /v         global view only: none of the main
  457.            databases are allowed to edit
  458. /!         disable edit mode and submenu for
  459.            nonformatted databases
  460. /!!        disable edit,submenu and window view
  461. /+help     "help" is the name of the help file
  462. /:initial  "initial" is the number of order of
  463.            the database files, which indicates
  464.            which database is to be initially
  465.            displayed
  466. //f:num    max number of open files allowed
  467. dbfile     first database file
  468. format     format filename
  469. prndesign  print design filename
  470. index1     index file
  471.  
  472. Database file <dbfile> can contain wildcards if the coresponding <format>, <prndesign> and <index> are not given explicitly.
  473.  
  474. Format file defaults to the same name as database file with extension .DBM, and similarly the associated print design file, with extension .DBP.
  475.  
  476. You may even run DBM in 43x132 screen mode if you have a VGA, so long you set your monitor screen externally to that display mode first, via for example the use of command "SCREEN.COM 2". Moreover, if you have a VGA monitor and set it to simulate CGA, you may actually like the effects.
  477.  
  478. We note that sometimes a screen, particularly in the 132 column mode, may exhibit `weird' color combination. In such cases, the apparently redundant options "/25" etc often fix the color to the right setting.
  479.  
  480. ┌──────────────┐
  481. │ Iron options │
  482. └──────────────┘
  483. IRON  dbm.exe [!|B|M|N][!]
  484.  
  485. [!|M|N][!]  - forces options /!, /B, /M, /N, or /!! to dbm.exe
  486.  
  487. The purpose of ironing an option to an executable file is to keep the end users from editing or viewing unauthorised data.
  488.  
  489. Because the ironing process is currently not reversible, make sure you save a copy of the original dbm.exe before you add the option forcefully. Better still, you could copy dbm.exe to e.g. dbn.exe, and then use "IRON DBN.EXE !" to add /! option to dbn.exe.
  490.  
  491. ┌─────────────────┐
  492. │ VGA 132 columns │
  493. └─────────────────┘
  494. SCREEN  0|1|2       -  0=25x80    1=25x132     2=43x132
  495.  
  496. If you have a VGA monitor, you could use a wider text screen of 132 columns by the above use of SCREEN.COM.
  497.  
  498. ┌───────────────┐
  499. │ Scratch files │
  500. └───────────────┘
  501. Three scratch files named _IDX@#$.TMP, _PRN@#$.TMP and _DBM@@#$.TMP in the working subdirectory should not be used for other purposes. They may be overwritten without warnings.
  502. (#)(GENERAL)
  503.  
  504.  
  505.  
  506. <#>(PROGRAM)
  507. ┌─────────┐
  508. │ Program │
  509. └─────────┘
  510.  
  511. SCREEN FORMAT DATABASE (*.DBM)
  512. ──────────────────────────────
  513.  
  514. FNAME:     field name
  515. MODE:      edit strategy mode
  516.            1=normal variable
  517.            3=memo variable
  518.            4=character field masked by
  519.              interpretation
  520.            5=memo display directly via
  521.              input region, edit/view in
  522.              larger area
  523.            6=memo display directly, edit
  524.              or view in input region
  525. PAGENO:    which page to include the field
  526. MAPFILE:   map filename for Mode=4
  527. PROMPT:    prompt name for field name
  528. PROW:      starting row of prompt
  529. PCOL:      starting col of prompt
  530. PWIDTH:    width of prompt
  531. ROW:       row of input region
  532. COL:       col of input region
  533. WIDTH:     width of input region
  534. HEIGHT:    height of input region for memo
  535. VIEWMODE:  editmode when under viewonly mode
  536.            0=default: view only
  537.            1=allow to edit even under
  538.              viewonly mode
  539. PCOLOR:    new color string for the prompt
  540.            e.g. "W/R" (""=take the default)
  541.  
  542.  
  543. ALLOWED STRUCTURE:
  544.  
  545.           {"FNAME","C",10,0},
  546.           {"MODE","N",3,0},
  547.           {"PAGENO","N",3,0},
  548.           {"MAPFILE","C",160,0},
  549.           {"PROMPT","C",100,0},
  550.           {"PROW","N",3,0},
  551.           {"PCOL","N",3,0},
  552.           {"PWIDTH","N",3,0},
  553.           {"ROW","N",3,0},
  554.           {"COL","N",3,0},
  555.           {"WIDTH","N",3,0},
  556.           {"HEIGHT","N",3,0}
  557.           {"VIEWMODE","N",3,0},
  558.           {"PCOLOR","C",10,0}
  559.  
  560. A database file of structure different from the above will not be considered as a valid format file.
  561.  
  562. We note that although PWIDTH=0 will imply that no prompt is to be displayed, the values of PROW and PCOL will still be used to calculate the 'clear all' rectangular area. Likewise for other similar fields.
  563.  
  564.  
  565. PRINT DESIGN DATABASE (*.DBP)
  566. ─────────────────────────────
  567.  
  568. PRN_MODE:   0=continue
  569.             1-13,100= ...
  570. H_SKIP:     horizontal skip of columns before
  571.             executing the codeblock, if
  572.             prn_mode!=0
  573. MAX_LINES:  execute current block will print
  574.             out max_lines of text, whenever
  575.             meaningful
  576. CODE_BLOCK: external code block in a string
  577. CODE_NAME:  string name for choosing an
  578.             external codeblock to execute
  579.  
  580. Code block specified by CODE_BLOCK field may
  581. take three arguments
  582.    nLeftSkip  - fixed horizontal skip
  583.    nLineCount - current line number in
  584.                 current page
  585.    nPrintMode - 0=display any informative
  586.                   messages
  587.                 1=program requests quiet,
  588.                   whenever possible
  589. However, in the PrePrintBlock (Prn_Mode=9), the first two parameters are automatically passed as 0.
  590.  
  591. If current print block is non-empty with PRN_MODE!=0, and that the previous block is also nonempty and returns a non-zero value 1, then an extra horizontal skip of LEFTSKIP, specified in the case of PRN_MODE=1, will be done before the execution of the new codeblock. We note that a nonzero value returned by code block also implies that the MAX_LINES has been fulfilled by the codeblock.
  592.  
  593. ALLOWED STRUCTURE:
  594.  
  595.            {"PRN_MODE","N",3,0},
  596.            {"H_SKIP","N",3,0},
  597.            {"MAX_LINES","N",3,0},
  598.            {"CODE_BLOCK","C",300,0},
  599.            {"CODE_NAME","C",20,0}
  600.  
  601. A database file will not be considered as a proper print design file if its structure is different from the above other than perhaps for the width of CODE_BLOCK so that long codeblock can be entered.
  602.  
  603.  
  604. PRN_MODE:
  605.  
  606.  0=no horizontal skip before executing
  607.    current codeblock -- current block
  608.    regarded as a continuation of a previous
  609.    block which has a non-zero mode
  610.  1=in this mode, H_SKIP and MAX_LINES are
  611.    the line width (not in use) and the
  612.    horizontal column skip number respectively
  613.  2=in this mode, H_SKIP and MAX_LINES are
  614.    the page height and the vertical line skip
  615.    number (not in use)
  616.  3=code block for the title of printout
  617.  4=code block to print each valid record
  618.  5=block to handle end of a pagebreak
  619.  6=block to handle start of a new page after
  620.    a page break (due to long printout)
  621.  7=code block for printing end remark of
  622.    printout
  623.  8=help string to be sought in DBM.HLP
  624.  9=codeblock that decides if a printout is to
  625.    be done at all (no-zero value to print)
  626. 10=codeblock to perform after printout, it
  627.    will be executed even if printout is not
  628.    performed due to zero return of block in
  629.    mode 9.
  630. 11=filter in string or codeblock for filter
  631.    toggle specific to related database.
  632.    If the starting character is "{", then
  633.    it is a codeblock, otherwise it will be
  634.    considered that the string a already an
  635.    expression for the filter
  636. 12=view/edit mode
  637.    0=ignore this entry
  638.    1=view only for this database
  639.    2=edit allowed
  640. 13=external codeblocks for some jobs specific
  641.    to the related database. The strings in
  642.    specified in 8. will be used as the name
  643.    of such codeblocks when choosing them.
  644.    The first 9 executable blocks will be
  645.    assigned to keys Alt_F1 to Alt_F9
  646. 14=same as mode 13, apart from that they
  647.    are never assigned to keys Alt_F1 to
  648.    Alt_F9. Instead, they must be called via
  649.    Alt_F10.
  650.  
  651. 100=initialisation codeblocks. It will be
  652.    run immediately after the print design
  653.    file is read in. Only the first block
  654.    of consecutive records, which have
  655.    PRN_MODE equal to either 100 or 0, will
  656.    be regarded as the initialisation blocks.
  657.    Error at running initialisation will not
  658.    be reported: so it is the block's job
  659.    to report any execution error.
  660.  
  661.  
  662. EXTRA FUNCTIONS:
  663.    RecTotal()
  664.       - total number of filtered records
  665.    PrintView(nWhichArea)
  666.       - execute print/view external code
  667.    Eject()
  668.       - page eject
  669.    Pack()
  670.       - pack current database
  671.    AppendTo(xFile,bCondition,lQuiet)
  672.       - append all current records
  673.         satisfying bCondition, to database
  674.         file xFile or workarea number
  675.         xFile. If lQuiet is true, no
  676.         summary will be reported
  677.    Z_0(nNum)
  678.       - get codeblock of nNum-th position
  679.         of public block stack
  680.    Z_1(nNum)
  681.       - get string representation of
  682.         current last position of the
  683.         external-block stack
  684.  
  685.  
  686. TRANSLATION MAP DATABASE (*.MAP)
  687. ────────────────────────────────
  688.  
  689. The first two fields serves as the mapping
  690.  
  691. FIELDGET(1)=translated value
  692. FIELDGET(2)=original index
  693.  
  694. Database of less than two fields are ignored. All map will be stringfield and maps are applicable to string type fields only.
  695.  
  696.  
  697. USERS' SCRATCH PUBLIC VARIABLES
  698. ───────────────────────────────
  699.  
  700. The are 31 public scratch variables which can be used inside the configurable print design files. These variables are X_0, X_1 to X_30 and should be considered as temporary variables. For more permanent global variables, use the global storage array. If field CODE_BLOCK starts with character other than "{", then the translated codeblock will be appended to the storage array. For the position of the last stored block, Z_1(0) is the number in string format (so that it can easily be macro expanded via &). For th
  701.  
  702. Typically, we
  703.    1. stashblock {|| block1}
  704.    2. x_1:=Z_1(0)      -- gives the position
  705.           This operation is again stashed to
  706.           Block_list{}, although useless.
  707.    3. stashblock {|| block2}
  708.    4. stashblock {|| block3}
  709.    5. x_2:=Z_1(-1)
  710.    6. x_3:=Z_1(-1)
  711.    7. {||&x_1,&x_2,&x_3}
  712.  
  713. We note that once 7. is read in, the code block will no longer need private/public variables x1,x2,x3. This way, reading external codeblocks will not exhausts the scratch public variables defined inside the program. All stashed codeblocks remain available all the time until a LOAD NEW DATABASE command (which will first close all workareas) is performed.
  714.  
  715.  
  716. EXAMPLES
  717. ────────
  718.  
  719. 1. The following record in a print design file will calculate the total number of records in related main database file which, under the current filter, have a nonzero 13-th field. In the case of STOCK.DBP, a nonzero 13-th field is a request for that item.
  720.  
  721.  PRN_MODE:    10
  722.  H_SKIP:       0
  723.  MAX_LINES:    0
  724.  CODE_BLOCK:   {|x,y,z| ;
  725.       x_1:=rectotal("fieldget(13)!=0"),;
  726.       IF(x_1!=0 .and. z=0,;
  727.       Message(alltrim(str(x_1))+;
  728.       " records printed"),)}
  729.  BLOCK_NAME:  PostPrintBlock
  730.  
  731. where x=leftskip, y=linenumber and z=messagemode (1=quiet).
  732.  
  733.  
  734. 2. The following 5 consecutive print design records will set the 13-th field of the related database to 0 value, under current filter.
  735.  
  736.  PRN_MODE:    13
  737.  H_SKIP:       0
  738.  MAX_LINES:    0
  739.  CODE_BLOCK:   if(.f.,, {||fieldput(13,0)})
  740.  BLOCK_NAME:   <step-1>
  741.  
  742. ■ i.e. save codeblock {||fieldput(13,0)}) to a designated public stack for future use.
  743.  
  744.  
  745.  PRN_MODE:    13
  746.  H_SKIP:       0
  747.  MAX_LINES:    0
  748.  CODE_BLOCK:  if(.f.,,{||x_1:=fieldget(13)!=0,;
  749.       if(x_1,x_3:=x_3+1,),x_1})
  750.  BLOCK_NAME:   <step-2>
  751.  
  752. ■ i.e. save codeblock {||x_1:= ...} again to the public stack.
  753.  
  754.  
  755.  PRN_MODE:    13
  756.  H_SKIP:       0
  757.  MAX_LINES:    0
  758.  CODE_BLOCK:   if(.f.,, x_1:=z_1(-1))
  759.  BLOCK_NAME:   <step-3>
  760.  
  761. ■ i.e. get the stack pointer in string that points to the block in <step-1>
  762.  
  763.  
  764.  PRN_MODE:    13
  765.  H_SKIP:       0
  766.  MAX_LINES:    0
  767.  CODE_BLOCK:   if(.f.,, x_2:=z_1(-1))
  768.  BLOCK_NAME:   <step-4>
  769.  
  770. ■ i.e. get the stack pointer x_2 that points to the block in <step-2>
  771.  
  772.  
  773.  PRN_MODE:    13
  774.  H_SKIP:       0
  775.  MAX_LINES:    0
  776.  CODE_BLOCK:   {||x_3:=0,;
  777.       dbeval(z_0(&x_1),z_0(&x_2)),;
  778.       if(x_3>0, message("Sales on "+;
  779.       alltrim(str(x_3))+" items removed"),)}
  780.  BLOCK_NAME:   Cancel Sale
  781.  
  782. ■ the macro expansion of x_1 and x_2 is done at the time of loading the above records. Thus x_1 and x_2 are available for other uses once these print design records are read in. Variable x_3 however will be active only when the final (visible) block is being executed.
  783. (#)(PROGRAM)
  784.  
  785.  
  786.  
  787.  
  788. <#>(REGISTER)
  789. ┌──────────┐
  790. │ Freeware │
  791. └──────────┘
  792. DBM is a freeware or cardware - it is free to all users.
  793.  
  794. If you find DBM useful to you, please send me a postcard as an incentive for future upgrades. Please send the card to Z JIANG, c/o DATA MIRACLES, Post Box 787, Armidale NSW 2351, Australia.
  795. (#)(REGISTER)
  796.  
  797.  
  798. <#>(TOPDOWN)
  799. ┌──────────────┐
  800. │ Topdown Menu │
  801. └──────────────┘
  802. MOUSE:
  803. Drag mouse with left button pressed. While left button is still being pressed, click right button on an entry to goto a deeper level of submenu if present, and click right button on the upper borderline of the square box to escape to a previous level.
  804.  
  805. Click right button on bottom borderline to exit menu completely and unconditionally, i.e. equivalent to pressing NUM-DEL key.
  806.  
  807. SEARCH ORDER:
  808. Search first matched capital letter starting from the next item. If the match is unique, it will be immediately chosen. Otherwise highlight the next matched item.
  809.  
  810. If no capital letters can match the user key_in_ed letter, highlight the item whose first letter matches.
  811.  
  812. ALT-key is the quickest way of getting a new topline menu item.
  813. (#)(TOPDOWN)
  814.  
  815.  
  816. <#>(TOPDOWN)_1
  817. ┌──────┐
  818. │ File │
  819. └──────┘
  820. LOAD:
  821. load in new database or format file
  822. WRITE DBFILE:
  823. save current database: only the non-deleted and filtered records are saved
  824. SAVE MAPS:
  825. save the maps to database files; the editmode copy of maps are saved if they are different from the viewmode copy.
  826. CONVERT FILE:
  827. database/text format conversion
  828. DB COMMIT:
  829. flush memory into database
  830. REMOVE:
  831. Close current workarea/database
  832. PACK:
  833. physically remove all deleted records of current workarea
  834. PRINT:
  835. send output described by the print design file to printer PRN
  836. EDIT PRINT:
  837. edit first the output described by the print design file before sending it to either a file or the printer PRN
  838. SHELL:
  839. temporarily exit to DOS, type EXIT to return
  840. QUIT:
  841. leave DBM completely
  842. (#)(TOPDOWN)_1
  843.  
  844. <#>(TOPDOWN)_1+10
  845. ┌───────┐
  846. │ Shell │
  847. └───────┘
  848. Exit to DOS temporarily; type EXIT to return.
  849. (#)(TOPDOWN)_1+10
  850.  
  851.  
  852. <#>(TOPDOWN)_1_1
  853. DATABASE ADDED:
  854. add a database to a new workarea
  855. FORMAT FILE:
  856. get a format filename for loading next database
  857. PRINT DESIGN:
  858. get a print design filename for loading next database
  859. NEW DATABASE:
  860. close all workareas then load a new database
  861. (#)(TOPDOWN)_1_1
  862.  
  863.  
  864. <#>(TOPDOWN)_1_1+1
  865. ┌───────────────┐
  866. │ Load Database │
  867. └───────────────┘
  868. You are about to load in a new database file in a new workarea.
  869. (#)(TOPDOWN)_1_1+1
  870.  
  871. <#>(TOPDOWN)_1_1+2
  872. ┌─────────────┐
  873. │ Load Format │
  874. └─────────────┘
  875. You are about to load in a new format file which will be used when you load the next database file.
  876. (#)(TOPDOWN)_1_1+2
  877.  
  878.  
  879. <#>(TOPDOWN)_1_1+4
  880. ┌──────────────┐
  881. │ New Database │
  882. └──────────────┘
  883. Close all database files before opening a new workarea.
  884. (#)(TOPDOWN)_1_1+4
  885.  
  886.  
  887.  
  888.  
  889.  
  890. <#>(TOPDOWN)_1_4
  891. ┌────────────┐
  892. │ Conversion │
  893. └────────────┘
  894. COPY TO:
  895. copy current workarea to a text file
  896. APPEND FROM:
  897. append records to current workarea from a text file
  898. STYLE:
  899. toggle conversion convention for the above two tasks
  900. DB2ASC:
  901. convert database into an ASCII file
  902. ASC2DB:
  903. convert ASCII file into database file
  904. MODE:
  905. change conversion mode for the above two tasks
  906.  
  907. Special markings in TRUTHFUL mode
  908. %+      start of a record
  909. %+*     start of a deleted record
  910. %-      memo field ends
  911.  
  912. A leading %+ in any field will thus be replaced by %+%+ in the converted ASCII file, a leading %- in each line of a memo field will be replaced by %-%- similarly.
  913. (#)(TOPDOWN)_1_4
  914.  
  915. <#>(TOPDOWN)_1_4_6
  916. ┌─────────────────┐
  917. │ Conversion Mode │
  918. └─────────────────┘
  919. TRUTHFUL:
  920. Conversion between DBfile and ASCII file is reversible
  921. DUMP:
  922. DBfile is dumped into text by separating each record by an empty line; only nonempty fields or nonempty lines in  memo fields are dumped.
  923. (#)(TOPDOWN)_1_4_6
  924.  
  925.  
  926.  
  927. <#>(TOPDOWN)_1_4_3
  928. ┌──────────────────┐
  929. │ Conversion Style │
  930. └──────────────────┘
  931. SDF:
  932. system data format
  933. DELIMITED:
  934. as delimited strings
  935. (#)(TOPDOWN)_1_4_3
  936.  
  937.  
  938.  
  939. <#>(TOPDOWN)_2
  940. ┌──────┐
  941. │ Edit │
  942. └──────┘
  943. FORMAT FREE:
  944. current record can be edited with fieldname given at the bottom line.
  945. INSERT RECORD:
  946. insert a record at the current record number, pushing backwards all the remaining records.
  947. DUPLICATE RECORD:
  948. insert current record to any record of any workarea
  949. MERGE FILE:
  950. append new database file into the current workarea.
  951. PREVIOUS RECORD:
  952. goto previous entry
  953. NEXT RECORD:
  954. goto next entry
  955. TOP RECORD:
  956. goto first record
  957. BOTTOM RECORD:
  958. goto last record
  959. GOTO RECORD:
  960. goto any record specified by a record number
  961. SELECT WORKAREA:
  962. Select one of the previously opened workarea/database
  963.  
  964. Note that hot key F5 displays current record number and the total number of records that are filtered through.
  965. (#)(TOPDOWN)_2
  966.  
  967. <#>(TOPDOWN)_3
  968. ┌────────┐
  969. │ Locate │
  970. └────────┘
  971. EDIT STRING:
  972. input search string
  973. MARK FIELDS:
  974. mark those fields for the string search
  975. START SEARCH:
  976. search from the first record
  977. CONTINUE SEARCH:
  978. search from the next record (Alt_= in pagemode, valid if last submenu operation is also a search operation)
  979. REVERSE SEARCH:
  980. search from the previous record
  981. FROM BOTTOM:
  982. search from the last record
  983. MATCH MODE:
  984. toggle search mode for substring match or whole string match
  985. (#)(TOPDOWN)_3
  986.  
  987.  
  988. <#>(TOPDOWN)_3_7
  989. ┌────────────┐
  990. │ Match Mode │
  991. └────────────┘
  992. SUBSTRING:
  993. match if search string is a substring of a marked field
  994. WHOLE:
  995. match if search string is same as a marked field up to leading and trailing spaces
  996. (#)(TOPDOWN)_3_7
  997.  
  998. <#>(TOPDOWN)_4
  999. ┌───────────┐
  1000. │ Structure │
  1001. └───────────┘
  1002. NEW STRUCT:
  1003. create a new structure file
  1004. ED STRUCT:
  1005. edit from current structure
  1006. DUPLICATE STRUCT:
  1007. copy structure from one database to another
  1008. WRITE FORMAT STRUCT:
  1009. make a standard format structure
  1010. PRN DESIGN STRUCT:
  1011. make a typical print design structure
  1012. (#)(TOPDOWN)_4
  1013.  
  1014.  
  1015. <#>(TOPDOWN)_4+4
  1016. ┌──────────────────┐
  1017. │ Format Structure │
  1018. └──────────────────┘
  1019. A format database (*.DBM) has fields:
  1020. FNAME:     field name
  1021. MODE:      edit strategy mode
  1022.            1=normal variable
  1023.            3=memo variable
  1024.            4=character field masked by
  1025.              interpretation
  1026.            5=memo display directly via
  1027.              input region, edit/view in
  1028.              larger area
  1029.            6=memo display directly, edit
  1030.              or view in input region
  1031. PAGENO:    which page to include the field
  1032. MAPFILE:   map filename for Mode=4
  1033. PROMPT:    prompt name for field name
  1034. PROW:      starting row of prompt
  1035. PCOL:      starting col of prompt
  1036. PWIDTH:    width of prompt
  1037. ROW:       row of input region
  1038. COL:       col of input region
  1039. WIDTH:     width of input region
  1040. HEIGHT:    height of input region for memo
  1041. VIEWMODE:  editmode when under viewonly mode
  1042.            0=default: view only
  1043.            1=allow to edit even under
  1044.              viewonly mode
  1045. PCOLOR:    New color string for the prompt
  1046.            e.g. "W/R" (""=take the default)
  1047.  
  1048. A map file is a database file (*.MAP) having two character fields with the first one as the translation of the second field.
  1049. (#)(TOPDOWN)_4+4
  1050.  
  1051.  
  1052. <#>(TOPDOWN)_4+5
  1053. ┌────────────────────────┐
  1054. │ Print Design Structure │
  1055. └────────────────────────┘
  1056. A print design database (*.DBP) has fields:
  1057. PRN_MODE:   0=continue
  1058.             1-13,100= ...
  1059. H_SKIP:     horizontal skip of columns before
  1060.             executing the codeblock, if
  1061.             prn_mode!=0
  1062. MAX_LINES:  execute current block will print
  1063.             out max_lines of text, whenever
  1064.             meaningful
  1065. CODE_BLOCK: external code block in a string
  1066. CODE_NAME:  string name for choosing an
  1067.             external codeblock to execute
  1068.  
  1069. For more details, see PROGRAM entry of INFO.
  1070. (#)(TOPDOWN)_4+5
  1071.  
  1072.  
  1073. <#>(TOPDOWN)_5
  1074. ┌────────┐
  1075. │ Review │
  1076. └────────┘
  1077. LOAD MAIN LOG:
  1078. load external file into main log buffer
  1079. EDIT MAIN:
  1080. edit main log buffer
  1081. WRITE MAIN:
  1082. save main log buffer to a file
  1083. LOAD SUBLOG:
  1084. load minor external file into sublog buffer
  1085. REVIEW SUBLOG:
  1086. edit sub log buffer
  1087. SUB TO MAINLOG:
  1088. append sublog buffer to main log buffer
  1089.  
  1090. NOTE: delete huge log buffers as soon as possible, so as to release the memory back to the pool
  1091. (#)(TOPDOWN)_5
  1092.  
  1093.  
  1094. <#>(TOPDOWN)_6
  1095. ┌─────────┐
  1096. │ Utility │
  1097. └─────────┘
  1098. FILTER:
  1099. set and remove filters
  1100. INDEX:
  1101. make, load and add indexes
  1102. RELATION:
  1103. relate different database workareas
  1104. DUMP AND SUM
  1105. dump all fields (apart from memo fields) to screen/printer/file, with report on summations over numerical fields
  1106. (#)(TOPDOWN)_6
  1107.  
  1108.  
  1109. <#>(TOPDOWN)_6_1
  1110. ┌─────────┐
  1111. │ Filters │
  1112. └─────────┘
  1113. USER DEFINED:
  1114. input a filter via a logic expression after disabling existing filters
  1115. FIELD STRING:
  1116. set up filter strategy upon the existing fields of the current area
  1117. NO FILTER:
  1118. disable the existing filters that are still in memory
  1119. VIEW FILTERS:
  1120. display which filter is currently in use in current workarea
  1121. (#)(TOPDOWN)_6_1
  1122.  
  1123.  
  1124.  
  1125. <#>(TOPDOWN)_6_2
  1126. ┌─────────┐
  1127. │ Indexes │
  1128. └─────────┘
  1129. TMP INDEX:
  1130. make a temporary index file after closing existing ones
  1131. INDEX OFF:
  1132. remove any existing indexes
  1133. MAKE INDEX:
  1134. make a named index file and close existing ones
  1135. EXTRA INDEX:
  1136. load an extra index file, the old controlling index (if any) will remain in control
  1137. LOAD NEW:
  1138. load a new index file after closing all existing ones for the current workarea
  1139. PICK CONTROL:
  1140. select a controlling index from the already opened indices for the current workarea
  1141. REBUILD INDEX:
  1142. update all the index files in current workarea
  1143. (#)(TOPDOWN)_6_2
  1144.  
  1145.  
  1146. <#>(TOPDOWN)_6_3
  1147. ┌───────────┐
  1148. │ Relations │
  1149. └───────────┘
  1150. ADD:
  1151. add a relation to the current workarea, so that the related child workarea will be sought simultaneously
  1152. DELETE:
  1153. delete all relations that take current database as parent workarea
  1154. VIEW:
  1155. list all the relations set with current workarea
  1156. PARENTS:
  1157. list all relational parental workareas
  1158. (#)(TOPDOWN)_6_3
  1159.  
  1160.  
  1161.  
  1162.  
  1163. <#>(TOPDOWN)_7
  1164. ┌──────┐
  1165. │ Info │
  1166. └──────┘
  1167. GENERAL:
  1168. general description of DBM
  1169. PROGRAM:
  1170. some technicalities of DBM
  1171. FREEWARE:
  1172. distribution status of DBM
  1173. (#)(TOPDOWN)_7
  1174.  
  1175.  
  1176. <#>(SELECTWORKAREA)
  1177. ┌─────────────────┐
  1178. │ Select Workarea │
  1179. └─────────────────┘
  1180. Choose a new database workarea.
  1181. (#)(SELECTWORKAREA)
  1182.  
  1183.  
  1184. <#>(SELECTINDEX)
  1185. ┌──────────────────────────┐
  1186. │ Select Controlling Index │
  1187. └──────────────────────────┘
  1188. Choose one of the opened indices for the current workarea as the controlling index
  1189. (#)(SELECTINDEX)
  1190.  
  1191.  
  1192. <#>(SEARCHRECORD)
  1193. ┌───────────────┐
  1194. │ Choose Record │
  1195. └───────────────┘
  1196. Choose a new record. Low case letter matches leading character if any, and upper case letters search for a substring.
  1197. (#)(SEARCHRECORD)
  1198.  
  1199.  
  1200.  
  1201. <#>(RUNEXTBLOCK)
  1202. ┌─────────────────────┐
  1203. │ Run external blocks │
  1204. └─────────────────────┘
  1205. Choose an item to run for the current workarea. These action blocks are read in from the related print design file which have typically extension .DBP
  1206. (#)(RUNEXTBLOCK)
  1207.  
  1208.  
  1209.  
  1210. <#>(VIEWPARENTS)
  1211. ┌──────────────┐
  1212. │ View Parents │
  1213. └──────────────┘
  1214. All relational parental workareas and their corresponding database filenames are listed.
  1215. (#)(VIEWPARENTS)
  1216.  
  1217.  
  1218. <#>(VIEWRELATIONS)
  1219. ┌────────────────┐
  1220. │ View Relations │
  1221. └────────────────┘
  1222. All relational child workareas and the corresponding relations are listed.
  1223. (#)(VIEWRELATIONS)
  1224.  
  1225.  
  1226. <#>(LOWMEMORY)
  1227. ┌────────────────────────┐
  1228. │ Memory Dangerously Low │
  1229. └────────────────────────┘
  1230. The memory sizes displayed are given in the order of
  1231.   (TextSize | LargestBlock/TotalFree/Runnable)
  1232.  
  1233. Conventional memory is detected to be dangerously low for the intended operation, which, if proceeded, may or may not cause the program to abort completely.
  1234.  
  1235. If YES is answered, no further similar questions will be asked in the current edit/view session.
  1236. (#)(LOWMEMORY)
  1237.  
  1238.