home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pgnode / node1 / datfil.100 next >
Text File  |  2006-10-19  |  9KB  |  246 lines

  1. DATFIL.100 by Paul Globman
  2.         Copyright (c) 1989
  3.  
  4. DATFIL.100 is a data organizer/filer program with user defined prompts and
  5. display parameters.
  6.  
  7. Data files are initialized with the built-in TEXT program, and the data you
  8. wish to organize is entered and displayed by using the DATFIL program.
  9.  
  10. Data file organization
  11. ----------------------
  12. Before initializing the data file you should organize the file structure and
  13. display layout.  Data files are organized into groups of records, and
  14. records are organized into groups of fields.  You should determine:
  15.  
  16. a) the number of fields for the data file record.
  17. b) the name (prompt) for each field.
  18. c) the "location" on the LCD where each field prompt will appear.
  19.  
  20. The "location" is the print position that would be used by BASIC's PRINT@
  21. function, and is calculated as follows:
  22.  
  23.  R = row (or line)
  24.  C = column
  25.  LOCATION = 40*(R-1)+(C-1)
  26.  
  27. So if you want a prompt to appear on the third line (row), column 5, you would
  28. calculate the location as follows:
  29.  
  30.     LOCATION = 40*(R-1)+(C-1)
  31.              = 40*(3-1)+(5-1)
  32.              = 40*(2)+(4)
  33.              = 84
  34.  
  35. Data is entered and displayed immediately following the prompt, so
  36. for a comfortable appearance you should add a space after the prompt.
  37.  
  38. Since lines are 40 characters, you can make one prompt appear directly under
  39. the previous prompt by just adding 40 to the location.  Add 80 if you wish to
  40. skip a line, etc.
  41.  
  42. Data file initialization
  43. ------------------------
  44. Create a new TEXT file using the TEXT program.  On the first line enter the
  45. number of fields (prompts) you need for this data file.  For EACH field, enter
  46. a prompt <cr> and a location <cr>.  For example:
  47.  
  48. 3
  49. Name   :
  50. 44
  51. Phone  :
  52. 84
  53. Comment:
  54. 124
  55.  
  56. This example is for a file with 3 prompts (first line).  The first prompt
  57. is the word "Name   :", and it will display at location 45.  Lines 4/5 and
  58. lines 6/7 represent fields 2 and 3.  Be sure there are no extra CR's (blank
  59. lines), but be sure there is a carraige return at the end of each line.
  60.  
  61. That's all you do manually, to set up a data file.  Some programs do this minor
  62. chore for you, but to keep the program small enough to run in the ALTLCD
  63. buffer, this task is done manually.
  64.  
  65.  
  66. The Program
  67. -----------
  68. You must CLEAR 0,62480 to make room for DATFIL.CO.  When you run DATFIL the
  69. following menu will appear:
  70.  
  71. DataFiler
  72.  
  73.         <A>dd
  74.         <D>isplay
  75.         <E>xit
  76.  
  77.         =>
  78.  
  79. Only an A, D, or E will have any affect.  All other responses are considered
  80. invalid.
  81.  
  82. Press A to add data records to your new data file.  Press D to display records.
  83. Press E to return to the 100 main menu or calling program.  The program 
  84. accepts upper or lower case characters.
  85.  
  86. ADD data
  87. --------
  88. You will be prompted to enter the name of a previously created data file you
  89. wish to use.  If the file does not exist, the program will beep and return
  90. to the A/D/E menu.
  91.  
  92. Assuming you have entered the name of a data file created for this program,
  93. DATFIL will read the "header" info (the number of prompts, field names, and
  94. locations).  You will then be prompted to enter data by displaying the prompts
  95.  you selected, and the program will accept your input.
  96.  
  97. After each record is entered, you will be prompted with "More?".  Press N for
  98. no more!  You are in the ADD mode so the program assumes you wish to continue
  99. to add data, and only a "N" will break out of the ADD mode and return to the
  100. A/D/E menu.
  101.  
  102. If you feel that a mistake was made when entering data, you will be able to
  103. correct that error with the TEXT program.
  104.  
  105. DISPLAY data
  106. ------------
  107. You will be prompted to enter the name of the data file you wish to display.
  108. If the file does not exist, the program will beep and return to the A/D/E menu.
  109.  
  110. Assuming you have entered the name of a data file created for this program,
  111. DATFIL will read the "header" info (the number of prompts, field names, and
  112. locations).  You will then be prompted to enter "String" data for selective
  113. record display.
  114.  
  115. Press ENTER if you wish to display all records, or enter characters to be
  116. matched.  Only records containing the match string will be displayed, if a
  117. match string is specified.
  118.  
  119. Each record is displayed by printing the field prompt at its location, followed
  120. by the data entry.
  121.  
  122. After each record is displayed, the cursor jumps to the upper left corner
  123. of the LCD and waits for a keyboard input.  Any key will bring up the next
  124. record except "N".  Press N for no more!  You are in the DISPLAY mode so the
  125. program assumes you wish to continue to display data records, and only a "N"
  126. will break out of the DISPLAY mode and return to the A/D/E menu.
  127.  
  128. A beep will sound when the last record of the file is displayed, and the next
  129. keypress will return to the A/D/E menu.  If the last record doesn't match the
  130. specified string, then a beep will sound with a blank screen when the file has
  131. been completely searched.
  132.  
  133.  
  134. ERRORS
  135. ------
  136. The beep is the only indication of an error.  If it occurs during the ADDing
  137. of data then it may indicate an out of memory condition and you should examine
  138. the data file to see if the last entry is properly organized.  If only a
  139. partial record is found, you should delete that last partial record, and
  140. then see about making more room in RAM before continuing to ADD data records.
  141.  
  142. If the last record is not properly organized, DATFIL may display data
  143.  which is past the "end of file" marker.  This is harmless to your programs or
  144. data files and is easily corrected using TEXT to correct the last data record
  145. in the file.  Use the N command to abort the display.
  146.  
  147. All other errors are trapped within the program and the operation is aborted.
  148. This is usually a bad A/D/E command, or a file name error.
  149.  
  150.  
  151. SUPPORT UTILITIES
  152. -----------------
  153. DATFIL data files are completely compatible with files created by
  154. CRDFIL.BA, and there are many utilities in DL4 that will enhance the use of
  155. DATFIL.  These utilities can be located with KEY = CRDFIL when scanning or
  156. browsing DL4.
  157.  
  158.  
  159. Enjoy the program.... 
  160.  
  161. Paul Globman [72227,1661]
  162. -----------------------------
  163. Run the following loader to create DATFIL.CO.
  164.  
  165. 1 '************************
  166. 2 '*  DATFIL.CO           *
  167. 3 '*    by Paul Globman   *
  168. 4 '*  Copyright (c) 1989  *
  169. 5 '************************
  170. 6 CLEAR 99, 62480 
  171. 10 FOR I = 62480 TO 62955 
  172. 20 READ X:POKE I,X:SM=SM+X
  173. 30 NEXT
  174. 40 IF SM = 66192 THEN 60
  175. 50 PRINT"error in data":STOP
  176. 60 SAVEM"DATFIL.CO",62480,62955,62480
  177. 1000 DATA 55,212,41,66,33,164,245
  178. 1010 DATA 205,48,244,50,130,244,231
  179. 1020 DATA 214,65,202,151,244,214,3
  180. 1030 DATA 202,60,244,61,194,17,244
  181. 1040 DATA 201,33,224,245,205,162,17
  182. 1050 DATA 205,203,18,205,233,15,254
  183. 1060 DATA 78,201,205,44,245,210,17
  184. 1070 DATA 244,33,215,101,205,162,17
  185. 1080 DATA 205,68,70,5,112,205,237
  186. 1090 DATA 244,205,192,244,205,237,244
  187. 1100 DATA 58,132,246,254,0,194,92
  188. 1110 DATA 245,213,205,206,244,213,205
  189. 1120 DATA 224,27,42,120,247,229,205
  190. 1130 DATA 248,244,34,120,247,225,205
  191. 1140 DATA 224,27,225,205,248,244,209
  192. 1150 DATA 29,194,94,244,205,145,244
  193. 1160 DATA 245,62,0,254,26,202,141
  194. 1170 DATA 244,241,194,83,244,245,241
  195. 1180 DATA 195,16,244,33,233,245,195
  196. 1190 DATA 48,244,205,44,245,210,17
  197. 1200 DATA 244,205,237,244,213,205,206
  198. 1210 DATA 244,213,205,224,27,205,68
  199. 1220 DATA 70,205,14,245,225,205,248
  200. 1230 DATA 244,209,29,194,160,244,205
  201. 1240 DATA 45,244,194,157,244,195,16
  202. 1250 DATA 244,123,135,79,205,248,244
  203. 1260 DATA 13,194,195,244,34,120,247
  204. 1270 DATA 201,229,205,248,244,229,197
  205. 1280 DATA 205,235,8,235,35,1,40
  206. 1290 DATA 0,17,0,0,28,85,8
  207. 1300 DATA 242,223,244,235,205,124,66
  208. 1310 DATA 193,209,225,201,205,49,66
  209. 1320 DATA 42,116,247,229,205,235,8
  210. 1330 DATA 225,62,10,6,255,43,35
  211. 1340 DATA 4,190,194,253,244,35,126
  212. 1350 DATA 254,26,192,50,130,244,195
  213. 1360 DATA 41,66,4,35,229,42,118
  214. 1370 DATA 247,72,6,0,205,109,107
  215. 1380 DATA 209,65,218,41,66,205,105
  216. 1390 DATA 52,34,118,247,43,54,10
  217. 1400 DATA 43,54,13,201,33,212,245
  218. 1410 DATA 205,162,17,205,68,70,229
  219. 1420 DATA 215,225,218,90,245,167,202
  220. 1430 DATA 90,245,5,88,35,205,11
  221. 1440 DATA 76,205,15,34,229,245,34
  222. 1450 DATA 116,247,205,45,107,34,118
  223. 1460 DATA 247,241,225,216,235,205,190
  224. 1470 DATA 31,183,201,229,213,197,79
  225. 1480 DATA 123,50,107,245,17,133,246
  226. 1490 DATA 42,120,247,6,1,229,213
  227. 1500 DATA 197,205,109,90,193,209,225
  228. 1510 DATA 202,152,245,126,254,10,35
  229. 1520 DATA 202,130,245,195,108,245,5
  230. 1530 DATA 194,108,245,126,254,26,34
  231. 1540 DATA 120,247,194,106,245,205,8
  232. 1550 DATA 245,33,125,244,195,155,245
  233. 1560 DATA 33,94,244,34,162,245,193
  234. 1570 DATA 209,225,195,94,244,12,68
  235. 1580 DATA 97,116,97,70,105,108,101
  236. 1590 DATA 114,10,10,13,9,60,65
  237. 1600 DATA 62,100,100,10,13,9,60
  238. 1610 DATA 68,62,105,115,112,108,97
  239. 1620 DATA 121,10,13,9,60,69,62
  240. 1630 DATA 120,105,116,10,10,13,9
  241. 1640 DATA 61,62,32,0,12,87,111
  242. 1650 DATA 114,107,102,105,108,101,63
  243. 1660 DATA 32,0,13,10,10,77,111
  244. 1670 DATA 114,101,63,0,27,72,0
  245. 1680 REM       END OF DATA
  246.