home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1984 Half 2
/
rerun-1984-07-12.d64
/
dfmail
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
164 lines
1000 rem-datafile 2.6 subprogram dfmail by mike konshak (c)1983
1002 rem-for 1525e, mps801, gemini 10x, okidata 92a, epson rx80 and others
1004 ift%=0thent%=6
1006 iflw=0thenlw=32
1008 open4,4:b$=chr$(32):b1$=chr$(10):cr$=chr$(13):gosub1280:goto1102
1010 rem----load subprograms
1012 print"[147] loading main program"
1014 load"datafile",8
1016 print"[147] loading report/listing subprogram"
1018 load"dfreport",8
1020 rem----quit routine
1022 print"[147]quitting now will erase current data"
1024 print"are you sure you want to quit?":print" y[146] or n[146] ?
1026 [161]a$:[139]a$[178]"" [167]1026
1028 [139]a$[178]"n"[167]1102
1030 [139]a$[178]"y"[167]1034
1032 [137]1026
1034 [153]"loadsubprogram terminated"
1036 [153]"datafilewait by mike konshak (c)1983":[128]
1038 [143] ----search routines
1040 [153]"load print options menu "
1042 [153]" awaitll records in file
1044 print" s[146]elect individual record
1046 [153]" fwaitind records with common fields
1048 print" e[146]xit to main menu
1050 [153]" press the appropriate key "
1052 [161]c$:[139]c$[178]"" [167]1052
1054 [139]c$[178]"a"[167]1098
1056 [139]c$[178]"s"[167]1066
1058 [139]c$[178]"f"[167]1074
1060 [139]c$[178]"e"[167]1102
1062 [137]1052
1064 [143]----select individual record
1066 [133]"print which record";i$:i[178][197](i$)
1068 [139]i[177]x[167][153]"no such record exists, try againononon":[137]1066
1070 [141]1268:[137]1040
1072 [143]----find common records
1074 [153]"load find records with common items "
1076 [129] n[178]1[164]f:[153]" ";n;"wait ";f$(n):[130]n
1078 [133]"which field is to be searched";sf
1080 [139]sf[179]0[176]sf[177]f [167][153]"ononon":[137]1078
1082 [153]"enter common itemwait ":[153]"(the entire string is not required)"
1084 [153]"";f$(sf);"wait ";:[133]t$
1086 [129]i[178]1[164]x
1088 [153]"searching record";i;"onon"
1090 [139]t$[178][200](rec$(k%(i),sf),[195](t$))[167][141]1268
1092 [130]i
1094 [137]1040
1096 [143]----print all records
1098 [153]"load":[129]i[178]1[164]x:[153]"on printing record #";i:[141]1268:[130]i:[137]1040
1100 [143]----mailing labels menu
1102 [153]"load mailing labels menu "
1104 [153]" pwaitre-defined format or"
1106 [153]" dwaitefine new format"
1108 [153]" cwaithange label size"
1110 [153]" ewaitxit to main program or"
1112 [153]" rwaiteport/listing program"
1114 [153]" qwaituit program"
1116 [153]" press the appropriate key "
1118 [161]c$:[139]c$[178]"" [167]1118
1120 [139]c$[178]"p"[167]1220
1122 [139]c$[178]"c"[167][141]1280:[137]1102
1124 [139]c$[178]"e"[167][152]4:[160]4:[137]1012
1126 [139]c$[178]"r"[167][152]4:[160]4:[137]1016
1128 [139]c$[178]"d"[167]1136
1130 [139]c$[178]"q"[167][152]4:[160]4:[137]1022
1132 [137]1118
1134 [143]------mailing list format
1136 [153]"load mailing list format "
1138 [153]" this format uses single row labels.
1140 print"each label contains up to"t%-1" rows.
1142 [153]"each row can consist of 1 to 3 fields.
1144 print"if the length of multiple items exceeds
1146 [153]"cmd"lw"characters, some data will be cutoff"
1148 [153]"number of rows?":[153]"? cmdcmdcmd";rw:[133]"on";rw
1150 [139]rw[177]t%[171]1[167][153]"ononon":[137]1148
1152 [139]rw[178]0[167]1102
1154 [153]"loadchoose which fields go in each row"
1156 [153]"enter 0wait if additional fields are":[153]"not desired."
1158 [129]n[178]1[164]f:[153]"";n;"wait ";f$(n):[130]n
1160 [129] j[178]1[164]rw:[153]"";[163]25)"row";j;""
1162 [129]l[178]1[164]3:[153][163]25)"onfield";l;" 0 cmdcmd";ml$(j,l)
1164 [153][163]32);"on";:[133]ml$(j,l)
1166 [130]l
1168 [130]j
1170 [153]"loaddo you wish to review your format and/or"
1172 [153]"make corrections? press ywait or nwait"
1174 [161]a$:[139]a$[178]""[167]1174
1176 [139]a$[178]"y"[167]1136
1178 [139]a$[178]"n"[167]1184
1180 [137]1174
1182 [143]-----save mailing label format
1184 [153]"save formatwait? ywait or nwait"
1186 [161]a$:[139]a$[178]""[167]1186
1188 [139]a$[178]"n"[167]1246
1190 [139]a$[178]"y"[167]1194
1192 [137]1186
1194 [153]"save under what file name?"
1196 [153]" ";nf$:[133]"on";nf$:[139]nf$[178]""[167]1102
1198 [159]15,8,15:[152]15,"s0:ml] "[170]nf$:[141]1316
1200 [159]5,8,5,"0:ml] "[170]nf$[170]",s,w":[141]1316
1202 [152]5,rw
1204 [129]i[178]1[164]rw:[129]n[178]1[164]3
1206 [152]5,ml$(i,n):[141]1316
1208 [130]n
1210 [130]i
1212 [152]5,"eof":[141]1316
1214 [160]5:[160]15
1216 [137]1246
1218 [143]-----load mailing label format
1220 [153]"load format from what file?"
1222 [153]" ";nf$:[133]"on";nf$:[139]nf$[178]""[167]1102
1224 [159]15,8,15:[159]5,8,5,"0:ml] "[170]nf$[170]",s,r":[141]1316
1226 [132]5,rw
1228 [129]i[178]1[164]rw:[129]n[178]1[164]3
1230 [132]5,ml$(i,n):[141]1316
1232 [130]n
1234 [130]i
1236 s[178]st:[139]s[179][177]0[167]1240
1238 [132]5,e$
1240 [160]5:[160]15
1242 [137]1170
1244 [143]-----print sample labels
1246 [153]"loadinsert single row tractor feed labels"
1248 [153]"run test labels to help position labels
1250 print"press t[146]est label
1252 [153]" cwaithoose records
1254 geta$:ifa$=""then1254
1256 ifa$="c"then1040
1258 ifa$<>"t"then1254
1260 fori=1torw:forj=1tolw:print#4,"*";:nextj:print#4,b1$;:nexti
1262 fori=1tot%-rw:print#4,b1$;:nexti
1264 goto1246
1266 rem----print labels
1268 forj=1torw:f1=val(ml$(j,1)):f2=val(ml$(j,2)):f3=val(ml$(j,3))
1270 print#4,left$(rec$(k%(i),f1)+b$+rec$(k%(i),f2)+b$+rec$(k%(i),f3),lw)
1272 nextj
1274 fors=1tot%-rw:print#4,b1$;:nexts
1276 return
1278 rem----choose label size
1280 print"[147] label size [146]"
1282 print" s[146]tandard - 5 rows per label"
1284 print" 15/16 inch by 3 1/2 inches"
1286 print" l[146]arge - 8 rows per label"
1288 print" 1 7/16 inch by 3 1/2 inches"
1290 print" o[146]ther - custom label size or"
1292 print" number of characters per row"
1294 print" note: labels are separated by one row"
1296 print" 32 characters per row is standard"
1298 print" press the appropriate key "
1300 getc$:ifc$=""then1300
1302 ifc$="s"thent%=6:return
1304 ifc$="l"thent%=9:return
1306 ifc$="o"then1310
1308 goto1300
1310 input" enter number of rows on label";t%:rw=t%:t%=t%+1
1312 input" enter # of characters per row";lw:return
1314 rem----disk error check
1316 input#15,en,em$,et,es:ifen<20thenreturn
1318 print" disk error[146]"en"[157], "em$","et"[157],"es
1320 print" press any key[146] to return to menu"
1322 geta$:ifa$=""then1322
1324 close5:close15:goto1102