home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1984 Half 2 / rerun-1984-07-12.d64 / dfmail (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  164 lines

  1. 1000 rem-datafile 2.6 subprogram dfmail by mike konshak (c)1983
  2. 1002 rem-for 1525e, mps801, gemini 10x, okidata 92a, epson rx80 and others
  3. 1004 ift%=0thent%=6
  4. 1006 iflw=0thenlw=32
  5. 1008 open4,4:b$=chr$(32):b1$=chr$(10):cr$=chr$(13):gosub1280:goto1102
  6. 1010 rem----load subprograms
  7. 1012 print"[147]       loading main program"
  8. 1014 load"datafile",8
  9. 1016 print"[147]  loading report/listing subprogram"
  10. 1018 load"dfreport",8
  11. 1020 rem----quit routine
  12. 1022 print"[147]quitting now will erase current data"
  13. 1024 print"are you sure you want to quit?":print" y[146] or n[146] ?
  14. 1026 [161]a$:[139]a$[178]"" [167]1026
  15. 1028 [139]a$[178]"n"[167]1102
  16. 1030 [139]a$[178]"y"[167]1034
  17. 1032 [137]1026
  18. 1034 [153]"loadsubprogram terminated"
  19. 1036 [153]"datafilewait by mike konshak (c)1983":[128]
  20. 1038 [143] ----search routines
  21. 1040 [153]"load            print options menu        "
  22. 1042 [153]"    awaitll records in file
  23. 1044 print"    s[146]elect individual record
  24. 1046 [153]"    fwaitind records with common fields
  25. 1048 print"    e[146]xit to main menu
  26. 1050 [153]"       press the appropriate key       "
  27. 1052 [161]c$:[139]c$[178]"" [167]1052
  28. 1054 [139]c$[178]"a"[167]1098
  29. 1056 [139]c$[178]"s"[167]1066
  30. 1058 [139]c$[178]"f"[167]1074
  31. 1060 [139]c$[178]"e"[167]1102
  32. 1062 [137]1052
  33. 1064 [143]----select individual record
  34. 1066 [133]"print which record";i$:i[178][197](i$)
  35. 1068 [139]i[177]x[167][153]"no such record exists, try againononon":[137]1066
  36. 1070 [141]1268:[137]1040
  37. 1072 [143]----find common records
  38. 1074 [153]"load     find records with common items    "
  39. 1076 [129] n[178]1[164]f:[153]" ";n;"wait ";f$(n):[130]n
  40. 1078 [133]"which field is to be searched";sf
  41. 1080 [139]sf[179]0[176]sf[177]f [167][153]"ononon":[137]1078
  42. 1082 [153]"enter common itemwait ":[153]"(the entire string is not required)"
  43. 1084 [153]"";f$(sf);"wait ";:[133]t$
  44. 1086 [129]i[178]1[164]x
  45. 1088 [153]"searching record";i;"onon"
  46. 1090 [139]t$[178][200](rec$(k%(i),sf),[195](t$))[167][141]1268
  47. 1092 [130]i
  48. 1094 [137]1040
  49. 1096 [143]----print all records
  50. 1098 [153]"load":[129]i[178]1[164]x:[153]"on printing record #";i:[141]1268:[130]i:[137]1040
  51. 1100 [143]----mailing labels menu
  52. 1102 [153]"load         mailing labels menu           "
  53. 1104 [153]"      pwaitre-defined format or"
  54. 1106 [153]"      dwaitefine new format"
  55. 1108 [153]"      cwaithange label size"
  56. 1110 [153]"      ewaitxit to main program or"
  57. 1112 [153]"      rwaiteport/listing program"
  58. 1114 [153]"      qwaituit program"
  59. 1116 [153]"       press the appropriate key       "
  60. 1118 [161]c$:[139]c$[178]"" [167]1118
  61. 1120 [139]c$[178]"p"[167]1220
  62. 1122 [139]c$[178]"c"[167][141]1280:[137]1102
  63. 1124 [139]c$[178]"e"[167][152]4:[160]4:[137]1012
  64. 1126 [139]c$[178]"r"[167][152]4:[160]4:[137]1016
  65. 1128 [139]c$[178]"d"[167]1136
  66. 1130 [139]c$[178]"q"[167][152]4:[160]4:[137]1022
  67. 1132 [137]1118
  68. 1134 [143]------mailing list format
  69. 1136 [153]"load         mailing list format           "
  70. 1138 [153]"  this format uses single row labels.
  71. 1140 print"each label contains up to"t%-1" rows.
  72. 1142 [153]"each row can consist of 1 to 3 fields.
  73. 1144 print"if the length of multiple items exceeds
  74. 1146 [153]"cmd"lw"characters, some data will be cutoff"
  75. 1148 [153]"number of rows?":[153]"?   cmdcmdcmd";rw:[133]"on";rw
  76. 1150 [139]rw[177]t%[171]1[167][153]"ononon":[137]1148
  77. 1152 [139]rw[178]0[167]1102
  78. 1154 [153]"loadchoose which fields go in each row"
  79. 1156 [153]"enter 0wait if additional fields are":[153]"not desired."
  80. 1158 [129]n[178]1[164]f:[153]"";n;"wait ";f$(n):[130]n
  81. 1160 [129] j[178]1[164]rw:[153]"";[163]25)"row";j;""
  82. 1162 [129]l[178]1[164]3:[153][163]25)"onfield";l;" 0 cmdcmd";ml$(j,l)
  83. 1164 [153][163]32);"on";:[133]ml$(j,l)
  84. 1166 [130]l
  85. 1168 [130]j
  86. 1170 [153]"loaddo you wish to review your format and/or"
  87. 1172 [153]"make corrections?  press ywait or nwait"
  88. 1174 [161]a$:[139]a$[178]""[167]1174
  89. 1176 [139]a$[178]"y"[167]1136
  90. 1178 [139]a$[178]"n"[167]1184
  91. 1180 [137]1174
  92. 1182 [143]-----save mailing label format
  93. 1184 [153]"save formatwait?             ywait or nwait"
  94. 1186 [161]a$:[139]a$[178]""[167]1186
  95. 1188 [139]a$[178]"n"[167]1246
  96. 1190 [139]a$[178]"y"[167]1194
  97. 1192 [137]1186
  98. 1194 [153]"save under what file name?"
  99. 1196 [153]"  ";nf$:[133]"on";nf$:[139]nf$[178]""[167]1102
  100. 1198 [159]15,8,15:[152]15,"s0:ml] "[170]nf$:[141]1316
  101. 1200 [159]5,8,5,"0:ml] "[170]nf$[170]",s,w":[141]1316
  102. 1202 [152]5,rw
  103. 1204 [129]i[178]1[164]rw:[129]n[178]1[164]3
  104. 1206 [152]5,ml$(i,n):[141]1316
  105. 1208 [130]n
  106. 1210 [130]i
  107. 1212 [152]5,"eof":[141]1316
  108. 1214 [160]5:[160]15
  109. 1216 [137]1246
  110. 1218 [143]-----load mailing label format
  111. 1220 [153]"load format from what file?"
  112. 1222 [153]"  ";nf$:[133]"on";nf$:[139]nf$[178]""[167]1102
  113. 1224 [159]15,8,15:[159]5,8,5,"0:ml] "[170]nf$[170]",s,r":[141]1316
  114. 1226 [132]5,rw
  115. 1228 [129]i[178]1[164]rw:[129]n[178]1[164]3
  116. 1230 [132]5,ml$(i,n):[141]1316
  117. 1232 [130]n
  118. 1234 [130]i
  119. 1236 s[178]st:[139]s[179][177]0[167]1240
  120. 1238 [132]5,e$
  121. 1240 [160]5:[160]15
  122. 1242 [137]1170
  123. 1244 [143]-----print sample labels
  124. 1246 [153]"loadinsert single row tractor feed labels"
  125. 1248 [153]"run test labels to help position labels
  126. 1250 print"press t[146]est label
  127. 1252 [153]"      cwaithoose records
  128. 1254 geta$:ifa$=""then1254
  129. 1256 ifa$="c"then1040
  130. 1258 ifa$<>"t"then1254
  131. 1260 fori=1torw:forj=1tolw:print#4,"*";:nextj:print#4,b1$;:nexti
  132. 1262 fori=1tot%-rw:print#4,b1$;:nexti
  133. 1264 goto1246
  134. 1266 rem----print labels
  135. 1268 forj=1torw:f1=val(ml$(j,1)):f2=val(ml$(j,2)):f3=val(ml$(j,3))
  136. 1270 print#4,left$(rec$(k%(i),f1)+b$+rec$(k%(i),f2)+b$+rec$(k%(i),f3),lw)
  137. 1272 nextj
  138. 1274 fors=1tot%-rw:print#4,b1$;:nexts
  139. 1276 return
  140. 1278 rem----choose label size
  141. 1280 print"[147]             label size               [146]"
  142. 1282 print"    s[146]tandard - 5 rows per label"
  143. 1284 print"      15/16 inch by 3 1/2 inches"
  144. 1286 print"    l[146]arge    - 8 rows per label"
  145. 1288 print"      1 7/16 inch by 3 1/2 inches"
  146. 1290 print"    o[146]ther    - custom label size or"
  147. 1292 print"      number of characters per row"
  148. 1294 print" note: labels are separated by one row"
  149. 1296 print" 32 characters per row is standard"
  150. 1298 print"       press the appropriate key       "
  151. 1300 getc$:ifc$=""then1300
  152. 1302 ifc$="s"thent%=6:return
  153. 1304 ifc$="l"thent%=9:return
  154. 1306 ifc$="o"then1310
  155. 1308 goto1300
  156. 1310 input" enter number of rows on label";t%:rw=t%:t%=t%+1
  157. 1312 input" enter # of characters per row";lw:return
  158. 1314 rem----disk error check
  159. 1316 input#15,en,em$,et,es:ifen<20thenreturn
  160. 1318 print" disk error[146]"en"[157], "em$","et"[157],"es
  161. 1320 print" press any key[146] to return to menu"
  162. 1322 geta$:ifa$=""then1322
  163. 1324 close5:close15:goto1102
  164.