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

  1. .. FORMFORM.DWS March 8, 1982
  2. .op
  3. .mt 0
  4. .hm 0
  5. .fm 0
  6. .mb 0
  7. .po 0
  8. .. DIMS has a built-in facility for designing a form for the display and
  9. .. printing of a file.  To make DIMS use your form design, you must create
  10. .. a format control file with all the detailed specifications in it.  There
  11. .. are two ways to make this ".DFO" file.  One is to use the transient com-
  12. .. mand "cform" which can type a form for you to fill out and then accept the
  13. .. specifications.  Another way is to edit this file with WordStar, changing
  14. .. the numbers to fit your design.  Once a ".DFO" file has been created, you
  15. .. can switch the dislay to that form by typing "format <name>" as a DEDIT
  16. .. command.  DEDIT will respond with "Format <name> loaded."
  17. .. 
  18. .. To make a format control file for the DIMS file <name>, start Word-
  19. .. Star, select the N mode and make your file name <name>.DWS.  As soon
  20. .. as you're in the file, do ^KR, and give the name FORMFORM.DWS.  This will
  21. .. read in this file into your workfile.  This file contains all the
  22. .. values which produce the default format (format 0).  You will want to
  23. .. edit these values to design your forms.  You may then delete these instruc-
  24. .. tions to save space, but the single . commands at the top are essential.
  25. ..
  26. .. A single format specification controls both screen display and the form
  27. .. on the printer.  These forms may be the same or as different as you
  28. .. like, only the sequence of fields must be the same for both.  Note in
  29. .. the form below that many items have two values on the line.  The second
  30. .. value is for the printer.  The DEDIT variable names into which the
  31. .. the parameters are read are given for debugging.  THE LINES WITH NO DOTS
  32. .. BECOME THE FORM CONTROL FILE, THEY MUST KEEP EXACTLY THE SAME NUMBER OF
  33. .. LINES AND ITEMS IN EACH LINE.
  34. ..
  35. .. After you have made all the changes you need, save and print it to a
  36. .. disk file <name>.DFO, which will make all the .. lines disappear.
  37. .. Edit the .DFO file and delete the extra blank line which may appear 
  38. .. at the end.  Try out the format on the DIMS file.  To make corrections 
  39. .. edit <name>.DWS again, and "re-assemble" the .DFO file by printing to 
  40. .. disk again.
  41. ..
  42. .. Words and numbers will be read as data input items by a Basic INPUT#
  43. .. statement.  Therefore there must be the expected number of words on
  44. .. each line, or everything after the error will be loaded into DEDIT
  45. .. wrong, and you will get the message "Error in loading format." and/or
  46. .. DEDIT will crash.  Some of the items are input by DEDIT as whole lines
  47. .. (LINE INPUT#), and these can have commas or anything you want.
  48. ..
  49. .. Code begins here.
  50. ..
  51. .. FO$ Name of this format
  52.    DEFAULT
  53. .. FFD$ Who wrote it, date of last update
  54.    Dan 12/8/81
  55. ..
  56. .. PARAMETERS FOR THE WHOLE SCREEN AND PAGE
  57. ..
  58. .. TM:  Top margin lines    LTM:  Top margin lines (printer)
  59.    0                  4 
  60. .. (not used for screen)    LLM:  Left margin
  61.    0                  13 
  62. .. SW:  Screen width        LW:  Printing width
  63.    80                  95 
  64. ..
  65. .. The following parameters, if not 0, will position a form on the screen
  66. .. and not use scrolling.  This type of form may have bugs in DEDIT.
  67. .. RS:  Records/screen        RP:  Records/page
  68.    0                  0 
  69. .. 
  70. .. If the printer is at or past the conditional page line, it will ad-
  71. .. vance to the next page.  Set to the number of lines on the page minus
  72. .. the top plus bottom margins, minus the normal number of lines used by
  73. .. a record.  This deals with the fact that extra-long data items in for-
  74. .. mats that don't limit the length of the field may overflow into extra
  75. .. lines on the printer.  Dims keeps track of this.
  76. .. (not used for screen)    LLP:  Conditional page line
  77.    0                  52 
  78. ..
  79. .. These parameters apply to printers with variable character and line
  80. .. spacing, DEDIT is set up for Diablo 1610/1620.
  81. .. HMI:  120th of an inch per character (use 10 for 12 per inch)
  82.    10 
  83. .. VMI:  48ths of an inch per line (use 8 for 6 per inch)
  84.    8 
  85. .. FSC$:  Reserved for future enhancement.
  86.    0
  87. ..
  88. .. The next three lines are heading lines for the screen display.  They
  89. .. will be printed only if something is entered on the line.  You must
  90. .. keep three lines here whether you enter anything on them or not.
  91. .. HL1$:  If this line ends on a space, "PAGE" and the page number will
  92. .. be added automatically.
  93.  
  94. .. HL2$:
  95.  
  96. .. HL3$:
  97.  
  98. ..
  99. .. The next three lines are heading lines for each printed page.  Same
  100. .. as above.
  101. .. LHL1$:  If this line ends on a space, the page number will print after.
  102.  
  103. .. LHL2$:
  104.  
  105. .. LHL3$:
  106.  
  107. ..
  108. .. HB:  Blank lines after head.    LHB:  Blank lines after heading.
  109.    0                  1 
  110. ..
  111. .. PARAMETERS FOR EACH RECORD OF THE FILE
  112. .. 
  113. .. The record number mode can be 0 (don't show number) or 1 (on).
  114. .. RM:                LRM:
  115.    1                  1 
  116. ..
  117. .. Location line parameters are used for forms which don't scroll.  They
  118. .. display fields at fixed positions on the screen or page.  Make all
  119. .. location line parameters 0 in a scrolling format.  The top line of the
  120. .. screen is line 1.  The first location line parameter is the line to print
  121. .. the record number on:
  122. .. RLL:                LRLL:
  123.    0                  0 
  124. ..
  125. .. Location column parameters position the printhead or cursor.  If there
  126. .. is no CR/LF after the previous item and the location column is 0, the
  127. .. item will be printed after the previous item, wherever that may have 
  128. .. left the printhead.  To print "Lastname, Firstname" define the field
  129. .. name for the Firstname field as ", ".  Use Column 1 to position at the
  130. .. left margin;  0 means put it wherever it is.
  131. ..
  132. .. Record number location column:
  133. .. RLC:                LRLC:
  134.    0                  0 
  135. .. The number of CR/LF's after the record number:
  136. .. RNB:                LRNB:
  137.    1                  1 
  138. .. 
  139. .. The following sequence of numbers determines the order in which the
  140. .. fields of the file will be printed, on both the screen and the prin-
  141. .. ter.  THERE MUST BE A ZERO TO TERMINATE THE SEQUENCE.
  142. .. SQ():
  143.    1  2  3  4  5  6  7  8  0
  144. ..
  145. .. Number of CR/LF's or blank lines after the whole record:
  146. .. EB:                LEB:
  147.    0                  1 
  148. .. 
  149. .. PARAMETERS FOR EACH FIELD IN RECORD.  USE BLOCK COPY TO REPEAT THIS 
  150. .. BLOCK AS MANY TIMES AS THERE ARE FIELDS TO BE SHOWN IN THE FORMAT.
  151. .. FIELDS ARE DESCRIBED IN THE ORDER THAT THEY APPEAR IN THE FORMAT.
  152. ..
  153. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  154. .. the 4-char default name, and 2 indicates a name will be entered.
  155. .. FM():            LFM():
  156.    1                  1     
  157. .. F2$():  Screen field name (whole line - used in mode 2 only).
  158.  
  159. .. LF2$():  Printer field name (whole line - used in mode 2 only).
  160.  
  161. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  162.    0                  0 
  163. .. NLC():  Name location col.    LNLC():  Field name location column
  164.    0                  0 
  165. .. The number of CR/LF's after the field name:
  166. .. FMB():            LFMB():
  167.    0                  0 
  168. .. The location line to print the field data:
  169. .. DLL():            LDLL():
  170.    0                  0 
  171. .. The column at which to print the field data:
  172. .. DLC():            LDLC():
  173.    8                  8 
  174. ..
  175. .. If the field is a numeric field and the following lines are not blank,
  176. .. the line will be used as a MBASIC PRINT USING string.
  177. .. PU$():  Numeric PRINT USING string for screen.
  178.  
  179. .. LPU$():  Numeric PRINT USING string for printer.
  180.  
  181. .. Field length.  Fields may be truncated to a certain number of char-
  182. .. acters to fit in the space designed.  0 means that whatever random
  183. .. length it is will be printed.  -1 means that the field will be skipped
  184. .. (so you can show a field on the screen but skip it on the printer).
  185. .. FL():            LFL():
  186.    0                  0 
  187. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  188. .. FB():            LFB():
  189.    1                1
  190. .. (end field)
  191. ..
  192. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  193. .. the 4-char default name, and 2 indicates a name will be entered.
  194. .. FM():            LFM():
  195.    1                  1     
  196. .. F2$():  Screen field name (line - mode 2 only).
  197.  
  198. .. LF2$():  Printer field name (line - mode 2 only).
  199.  
  200. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  201.    0                  0 
  202. .. NLC():  Name location col.    LNLC():  Field name location column
  203.    0                  0 
  204. .. The number of CR/LF's after the field name:
  205. .. FMB():            LFMB():
  206.    0                  0 
  207. .. The location line to print the field data:
  208. .. DLL():            LDLL():
  209.    0                  0 
  210. .. The column at which to print the field data:
  211. .. DLC():            LDLC():
  212.    8                  8 
  213. ..
  214. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  215. .. here will be used.
  216. .. PU$():  Numeric PRINT USING string for screen.
  217.  
  218. .. LPU$():  Numeric PRINT USING string for printer.
  219.  
  220. .. Field length.  Fields may be truncated to a certain number of char-
  221. .. acters to fit in the space designed.  0 means that whatever random
  222. .. length it is will be printed.  -1 means that the field will be skipped
  223. .. (so you can show a field on the screen but skip it on the printer).
  224. .. FL():            LFL():
  225.    0                  0 
  226. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  227. .. FB():            LFB():
  228.    1                1
  229. .. (end field)
  230. ..
  231. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  232. .. the 4-char default name, and 2 indicates a name will be entered.
  233. .. FM():            LFM():
  234.    1                  1     
  235. .. F2$():  Screen field name (line - mode 2 only).
  236.  
  237. .. LF2$():  Printer field name (line - mode 2 only).
  238.  
  239. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  240.    0                  0 
  241. .. NLC():  Name location col.    LNLC():  Field name location column
  242.    0                  0 
  243. .. The number of CR/LF's after the field name:
  244. .. FMB():            LFMB():
  245.    0                  0 
  246. .. The location line to print the field data:
  247. .. DLL():            LDLL():
  248.    0                  0 
  249. .. The column at which to print the field data:
  250. .. DLC():            LDLC():
  251.    8                  8 
  252. ..
  253. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  254. .. here will be used.
  255. .. PU$():  Numeric PRINT USING string for screen.
  256.  
  257. .. LPU$():  Numeric PRINT USING string for printer.
  258.  
  259. .. Field length.  Fields may be truncated to a certain number of char-
  260. .. acters to fit in the space designed.  0 means that whatever random
  261. .. length it is will be printed.  -1 means that the field will be skipped
  262. .. (so you can show a field on the screen but skip it on the printer).
  263. .. FL():            LFL():
  264.    0                  0 
  265. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  266. .. FB():            LFB():
  267.    1                1
  268. .. (end field)
  269. ..
  270. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  271. .. the 4-char default name, and 2 indicates a name will be entered.
  272. .. FM():            LFM():
  273.    1                  1     
  274. .. F2$():  Screen field name (line - mode 2 only).
  275.  
  276. .. LF2$():  Printer field name (line - mode 2 only).
  277.  
  278. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  279.    0                  0 
  280. .. NLC():  Name location col.    LNLC():  Field name location column
  281.    0                  0 
  282. .. The number of CR/LF's after the field name:
  283. .. FMB():            LFMB():
  284.    0                  0 
  285. .. The location line to print the field data:
  286. .. DLL():            LDLL():
  287.    0                  0 
  288. .. The column at which to print the field data:
  289. .. DLC():            LDLC():
  290.    8                  8 
  291. ..
  292. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  293. .. here will be used.
  294. .. PU$():  Numeric PRINT USING string for screen.
  295.  
  296. .. LPU$():  Numeric PRINT USING string for printer.
  297.  
  298. .. Field length.  Fields may be truncated to a certain number of char-
  299. .. acters to fit in the space designed.  0 means that whatever random
  300. .. length it is will be printed.  -1 means that the field will be skipped
  301. .. (so you can show a field on the screen but skip it on the printer).
  302. .. FL():            LFL():
  303.    0                  0 
  304. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  305. .. FB():            LFB():
  306.    1                1
  307. .. (end field)
  308. ..
  309. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  310. .. the 4-char default name, and 2 indicates a name will be entered.
  311. .. FM():            LFM():
  312.    1                  1     
  313. .. F2$():  Screen field name (line - mode 2 only).
  314.  
  315. .. LF2$():  Printer field name (line - mode 2 only).
  316.  
  317. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  318.    0                  0 
  319. .. NLC():  Name location col.    LNLC():  Field name location column
  320.    0                  0 
  321. .. The number of CR/LF's after the field name:
  322. .. FMB():            LFMB():
  323.    0                  0 
  324. .. The location line to print the field data:
  325. .. DLL():            LDLL():
  326.    0                  0 
  327. .. The column at which to print the field data:
  328. .. DLC():            LDLC():
  329.    8                  8 
  330. ..
  331. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  332. .. here will be used.
  333. .. PU$():  Numeric PRINT USING string for screen.
  334.  
  335. .. LPU$():  Numeric PRINT USING string for printer.
  336.  
  337. .. Field length.  Fields may be truncated to a certain number of char-
  338. .. acters to fit in the space designed.  0 means that whatever random
  339. .. length it is will be printed.  -1 means that the field will be skipped
  340. .. (so you can show a field on the screen but skip it on the printer).
  341. .. FL():            LFL():
  342.    0                  0 
  343. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  344. .. FB():            LFB():
  345.    1                1
  346. .. (end field)
  347. ..
  348. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  349. .. the 4-char default name, and 2 indicates a name will be entered.
  350. .. FM():            LFM():
  351.    1                  1     
  352. .. F2$():  Screen field name (line - mode 2 only).
  353.  
  354. .. LF2$():  Printer field name (line - mode 2 only).
  355.  
  356. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  357.    0                  0 
  358. .. NLC():  Name location col.    LNLC():  Field name location column
  359.    0                  0 
  360. .. The number of CR/LF's after the field name:
  361. .. FMB():            LFMB():
  362.    0                  0 
  363. .. The location line to print the field data:
  364. .. DLL():            LDLL():
  365.    0                  0 
  366. .. The column at which to print the field data:
  367. .. DLC():            LDLC():
  368.    8                  8 
  369. ..
  370. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  371. .. here will be used.
  372. .. PU$():  Numeric PRINT USING string for screen.
  373.  
  374. .. LPU$():  Numeric PRINT USING string for printer.
  375.  
  376. .. Field length.  Fields may be truncated to a certain number of char-
  377. .. acters to fit in the space designed.  0 means that whatever random
  378. .. length it is will be printed.  -1 means that the field will be skipped
  379. .. (so you can show a field on the screen but skip it on the printer).
  380. .. FL():            LFL():
  381.    0                  0 
  382. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  383. .. FB():            LFB():
  384.    1                1
  385. .. (end field)
  386. ..
  387. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  388. .. the 4-char default name, and 2 indicates a name will be entered.
  389. .. FM():            LFM():
  390.    1                  1     
  391. .. F2$():  Screen field name (line - mode 2 only).
  392.  
  393. .. LF2$():  Printer field name (line - mode 2 only).
  394.  
  395. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  396.    0                  0 
  397. .. NLC():  Name location col.    LNLC():  Field name location column
  398.    0                  0 
  399. .. The number of CR/LF's after the field name:
  400. .. FMB():            LFMB():
  401.    0                  0 
  402. .. The location line to print the field data:
  403. .. DLL():            LDLL():
  404.    0                  0 
  405. .. The column at which to print the field data:
  406. .. DLC():            LDLC():
  407.    8                  8 
  408. ..
  409. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  410. .. here will be used.
  411. .. PU$():  Numeric PRINT USING string for screen.
  412.  
  413. .. LPU$():  Numeric PRINT USING string for printer.
  414.  
  415. .. Field length.  Fields may be truncated to a certain number of char-
  416. .. acters to fit in the space designed.  0 means that whatever random
  417. .. length it is will be printed.  -1 means that the field will be skipped
  418. .. (so you can show a field on the screen but skip it on the printer).
  419. .. FL():            LFL():
  420.    0                  0 
  421. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  422. .. FB():            LFB():
  423.    1                1
  424. .. (end field)
  425. ..
  426. .. The FIELD NAME MODE may be 0, 1 or 2.  0 means no field name, 1 means
  427. .. the 4-char default name, and 2 indicates a name will be entered.
  428. .. FM():            LFM():
  429.    1                  1     
  430. .. F2$():  Screen field name (line - mode 2 only).
  431.  
  432. .. LF2$():  Printer field name (line - mode 2 only).
  433.  
  434. .. NLL():  Field name loc. ln.  LNLL():  Field name location line
  435.    0                  0 
  436. .. NLC():  Name location col.    LNLC():  Field name location column
  437.    0                  0 
  438. .. The number of CR/LF's after the field name:
  439. .. FMB():            LFMB():
  440.    0                  0 
  441. .. The location line to print the field data:
  442. .. DLL():            LDLL():
  443.    0                  0 
  444. .. The column at which to print the field data:
  445. .. DLC():            LDLC():
  446.    8                  8 
  447. ..
  448. .. If the field is a numeric field, a MBASIC PRINT USING string entered
  449. .. here will be used.
  450. .. PU$():  Numeric PRINT USING string for screen.
  451.  
  452. .. LPU$():  Numeric PRINT USING string for printer.
  453.  
  454. .. Field length.  Fields may be truncated to a certain number of char-
  455. .. acters to fit in the space designed.  0 means that whatever random
  456. .. length it is will be printed.  -1 means that the field will be skipped
  457. .. (so you can show a field on the screen but skip it on the printer).
  458. .. FL():            LFL():
  459.    0                  0 
  460. .. Number of CR/LF's after this field (use 1 at end of line if necess.)
  461. .. FB():            LFB():
  462.    1                1
  463. .. (end field)
  464. ..
  465.