home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / DATABASE / DIMS103.ARK / FORMFORM.DWS < prev    next >
Text File  |  1986-12-07  |  7KB  |  155 lines

  1. .. FORMFORM.DWS January 15, 1984
  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 use that form but skip entering the
  14. .. data and instead edit this file with WordStar, changing the numbers to 
  15. .. fit your design.  Once a ".DFO" file has been created, you can switch
  16. .. the dislay to that form by typing "format <name>" as a DEDIT command.
  17. .. DEDIT will respond with "Format <name> loaded."
  18. .. 
  19. .. To make a format control file for the DIMS file <name>, start Word-
  20. .. Star, select the N mode and make your file name <name>.DWS.  As soon
  21. .. as you're in the file, do ^KR, and give the name FORMFORM.DWS.  This will
  22. .. read in this file into your workfile.  This file contains all the
  23. .. values which produce the default format (format 0).  You will want to
  24. .. edit these values to design your forms.  You may then delete these instruc-
  25. .. tions to save space, but the single "." commands at the top are essential.
  26. ..
  27. .. A single format specification controls both screen display and the form
  28. .. on the printer.  These forms may be the same or as different as you
  29. .. like.  Only the sequence of fields must be the same for both.  Note in
  30. .. the form below that many items have two values on the line.  The second
  31. .. value is for the printer.  The DEDIT variable names into which the
  32. .. the parameters are read are given for debugging.  THE LINES WITH NO DOTS
  33. .. BECOME THE FORM CONTROL FILE, THEY MUST KEEP EXACTLY THE SAME NUMBER OF
  34. .. LINES AND THE SAME NUMBER ITEMS IN EACH LINE.
  35. ..
  36. .. After you have made all the changes you need, save and print it to a
  37. .. disk file <name>.DFO, which will make all the .. lines disappear.
  38. .. Then edit the .DFO file in N mode and delete the extra blank lines
  39. .. which appear at the end.  Try out the format on the DIMS file.  To make
  40. .. corrections edit <name>.DWS again, and "re-assemble" the .DFO file by
  41. .. printing to disk again.
  42. ..
  43. .. Words and numbers will be read as data input items by a Basic INPUT#
  44. .. statement.  Therefore there must be the expected number of words on
  45. .. each line, or everything after the error will be loaded into DEDIT
  46. .. wrong, and you will get the message "Error in loading format." and/or
  47. .. DEDIT will crash.  Some of the items (i.e. headings) are input by DEDIT
  48. .. as whole lines with LINE INPUT#, and these can have commas or anything
  49. .. you want.
  50. ..
  51. .. Code begins here.  Don't delete any lines with no dots!
  52. ..--------------------------------------------------------------------------
  53. .. FO$ Name of this format
  54.    DEFAULT
  55. .. FFD$ Who wrote it, date of last update
  56.    Dan Dugan 1/15/84
  57. ..--------------------------------------------------------------------------
  58. .. PARAMETERS FOR THE WHOLE SCREEN AND PAGE
  59. ..
  60. .. TM:  Top margin lines    LTM:  Top margin lines (printer)
  61.    0                  4 
  62. .. (not used for screen)    LLM:  Left margin
  63.    0                  3 
  64. .. SW:  Screen width        LW:  Printing width
  65.    80                  95 
  66. ..
  67. .. The following parameters, if not 0, will position a form on the screen
  68. .. and not use scrolling.  This type of form may have bugs in DEDIT.
  69. .. RS:  Records/screen        RP:  Records/page
  70.    0                  0 
  71. .. 
  72. .. If the printer is at or past the conditional page line, it will ad-
  73. .. vance to the next page.  Set to the number of lines on the page minus
  74. .. the top plus bottom margins, minus the normal number of lines used by
  75. .. a record.  This deals with the fact that extra-long data items in for-
  76. .. mats that don't limit the length of the field may overflow into extra
  77. .. lines on the printer.  Dims keeps track of this.
  78. .. (not used for screen)    LLP:  Conditional page line
  79.    0                  52 
  80. ..
  81. .. These parameters apply to printers with variable character and line
  82. .. spacing, DEDIT is set up for Diablo 1610/1620.
  83. .. HMI:  120th of an inch per character (use 10 for 12 per inch)
  84.    10 
  85. .. VMI:  48ths of an inch per line (use 8 for 6 per inch)
  86.    8 
  87. .. FSC$:  Reserved for future enhancement.
  88.    0
  89. ..
  90. .. The next three lines are heading lines for the screen display.  They
  91. .. will be printed only if something is entered on the line.  You must
  92. .. keep three lines here whether you enter anything on them or not.
  93. .. HL1$:  If this line ends on a space, "PAGE" and the page number will
  94. .. be added automatically.
  95.  
  96. .. HL2$:
  97.  
  98. .. HL3$:
  99.  
  100. ..
  101. .. The next three lines are heading lines for each printed page.  Same
  102. .. as above.
  103. .. LHL1$:  If this line ends on a space, the page number will print after.
  104.  
  105. .. LHL2$:
  106.  
  107. .. LHL3$:
  108.  
  109. ..
  110. .. HB:  Blank lines after head.    LHB:  Blank lines after heading.
  111.    0                  1 
  112. ..--------------------------------------------------------------------------
  113. .. PARAMETERS FOR EACH RECORD OF THE FILE
  114. .. 
  115. .. The record number mode can be 0 (don't show number) or 1 (on).
  116. .. RM:                LRM:
  117.    1                  1 
  118. ..
  119. .. Location line parameters are used for forms which don't scroll.  They
  120. .. display fields at fixed positions on the screen or page.  Make all
  121. .. location line parameters 0 in a scrolling format.  The top line of the
  122. .. screen is line 1.  The first location line parameter is the line to print
  123. .. the record number on:
  124. .. RLL:                LRLL:
  125.    0                  0 
  126. ..
  127. .. Location column parameters position the printhead or cursor.  If there
  128. .. is no CR/LF after the previous item and the location column is 0, the
  129. .. item will be printed after the previous item, wherever that may have 
  130. .. left the printhead.  To print "Lastname, Firstname" define the field
  131. .. name for the Firstname field as ", ".  Use Column 1 to position at the
  132. .. left margin;  0 means put it wherever it is.
  133. ..
  134. .. Record number location column:
  135. .. RLC:                LRLC:
  136.    0                  0 
  137. .. The number of CR/LF's after the record number:
  138. .. RNB:                LRNB:
  139.    1                  0 
  140. .. 
  141. .. The following sequence of numbers determines the order in which the
  142. .. fields of the file will be printed, on both the screen and the prin-
  143. .. ter.  MAKE IT THE NUMBERS AND ORDER YOU WANT.  THERE MUST BE A ZERO
  144. .. TO TERMINATE THE SEQUENCE.
  145. .. SQ():
  146.    1  2  3  4  5  6  7  8  0
  147. ..
  148. .. Number of CR/LF's or blank lines after the whole record:
  149. .. EB:                LEB:
  150.    0                  1 
  151. .. 
  152. .. PARAMETERS FOR EACH FIELD IN RECORD.  USE ^KR TO READ IN "FIELDFOR.DWS" 
  153. .. AS MANY TIMES AS THERE ARE FIELDS TO BE SHOWN IN THE FORMAT.
  154. .. FIELDS ARE DESCRIBED IN THE ORDER THAT THEY APPEAR IN THE FORMAT.
  155.