ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

582 lines
25 KiB

  1. 1 MERGE "MERGE.BAS"
  2. 10 REM 12/05/78
  3. 20 REM ** TRS-80 INVENTORY CONTROL SYSTEM **
  4. 25 IF PEEK(14312)>127 THEN PRINT "PRINTER NOT READY":GOTO 40
  5. 30 REM LPRINT CHR$(27);CHR$(20)
  6. 40 POKE 16425,1
  7. :CLEAR 500
  8. :W$=""
  9. :ON ERROR GOTO 5000
  10. :GOSUB 32000
  11. 45 OPEN "I",1,"TRANSFER"
  12. 50 LINE INPUT #1,PI$:LINE INPUT #1,PS$:LINE INPUT #1,PD$
  13. 60 LINE INPUT #1,PT$:LINE INPUT #1,PR$
  14. 70 CLOSE 1:KILL "TRANSFER"
  15. 80 CLS:GOSUB 250:GOTO 200
  16. 90 REM ------------------------------------------------------
  17. 100 ON ERROR GOTO 0
  18. 110 IF LEFT$(TIME$,2)="00" OR MID$(TIME$,3,1)<>"/" OR MID$(TIME$,6,1)<>"/" THEN CLS:GOTO 190
  19. 120 CLS:PRINT @ 458,"DATE IS SET TO ";LEFT$(TIME$,8);" . IS THIS CORRECT ? ";
  20. 130 FL=1:GOSUB 370:Q$=IN$:IF Q$<>"Y" AND Q$<>"N" THEN PRINT CHR$(8);:GOTO 130 ELSE IF Q$="N" THEN 140 ELSE 190
  21. 140 PRINT @ 588,"ENTER CORRECT DATE (MM/DD/YY) : ";
  22. 150 FL=8:GOSUB 370:DT$=IN$
  23. 160 POKE 16454,VAL(LEFT$(DT$,2)):POKE 16452,VAL(RIGHT$(DT$,2))
  24. 170 POKE 16453,VAL(MID$(DT$,4,2))
  25. 180 GOTO 110
  26. 190 CLS:GOSUB 250:GOSUB 3180:IF P$="" THEN 190 ELSE GOSUB 3170:PRINT @ 472,"INITIALIZING";CHR$(30)
  27. 200 DEFINT A,C,H,J,K,F,L,M,N,P,T,V,W:DIM V(1000)
  28. 210 DEF FNGP(IC,IP)=(IP-IC)/IP*100
  29. 215 GOSUB 3175
  30. 220 ON ERROR GOTO 5000:POKE 16424,67:POKE 16425,1:XX=1:LF$=CHR$(32):LL$=STRING$(132,"-")
  31. 230 RESTORE:READ A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,L0$,L1$,L6$,L7$:RESTORE :GOTO 3010
  32. 240 GOSUB 250:GOTO 270
  33. 250 CLS:PRINT TAB(13)"TRS-80 INVENTORY CONTROL SYSTEM":PRINT @ 117,LEFT$(TIME$,8);:PRINT :RETURN
  34. 260 GOSUB 250:PRINT TAB(20)"SYSTEM STATUS REPORT":PRINT :GOSUB 3070:PRINT :GOSUB 2480:RETURN
  35. 270 PRINT "FUNCTIONS:
  36. :PRINT "
  37. :PRINT "1 - INPUT NEW ITEMS
  38. :PRINT "2 - ACCESS / UPDATE
  39. :PRINT "3 - OUTPUT REPORTS AND SUMMARIES
  40. :PRINT "4 - CREATE NEW INVENTORY
  41. :PRINT "5 - ENTER SALES TICKETS
  42. :PRINT "6 - END OF PERIOD PROCESSING"
  43. 280 PRINT "7 - ENTER RECEIPTS OF ON-ORDER ITEMS
  44. :PRINT "8 - ENTER ITEMS PLACED ON ORDER
  45. :PRINT "9 - DISPLAY SYSTEM STATUS
  46. :PRINT "@ - EXIT FROM PROGRAM"
  47. 290 PRINT :PRINT "SELECT FUNCTION > ";
  48. 300 FL=-1:GOSUB 370:S$=IN$:IF CF=1 THEN 330 ELSE IF S$<"1" OR S$>"9" THEN PRINT CHR$(8);:GOTO 300
  49. 310 ON VAL(S$) GOSUB 560,800,1530,1800,1870,2000,1300,1310,260
  50. 320 IF FD=0 THEN 240 ELSE CLS:PRINT @ 464,"LOADING IN DATA FOR SORT":CLOSE :GOSUB 2750::GOSUB 2720:GOTO 3670
  51. 330 CLS
  52. 340 PRINT @ 472,"END OF PROGRAM":PRINT :PRINT :IF ER=1 THEN CLOSE :CLEAR 50:END ELSE CLOSE :GOSUB 2750:GOSUB 2720:CLEAR 50:END
  53. 350 PRINT @ 128,CHR$(30);CHR$(29);"(TYPE @ TO EXIT TO MAIN MENU)";:RETURN
  54. 360 PRINT @ 128,CHR$(30);CHR$(29);"(TYPE @ TO REDO ENTRY)";:RETURN
  55. 370 REM IN$="":CF=0:W$=INKEY$:WD=0:WS=WD:WL=WD:IF FL=WD THEN FL=1
  56. 375 IN$="":CF=0:W$="":WD=0:WS=WD:WL=WD:IF FL=WD THEN FL=1
  57. 377 INPUT IN$:W=LEN(IN$):W$=RIGHT$(IN$,1):IF W$="@" THEN CF=1
  58. 378 RETURN
  59. 380 PRINT STRING$(ABS(FL),CHR$(136));STRING$(ABS(FL),CHR$(24));
  60. 390 PRINT CHR$(14);:FOR W=1 TO 25:W$=INKEY$:IF W$<>"" THEN 400 : NEXT :PRINT CHR$(15);:FOR W=1 TO 25:W$=INKEY$:IF W$<>"" THEN 400 : NEXT :GOTO 390
  61. 400 IF W$<>CHR$(13) THEN 420 ELSE PRINT STRING$(ABS(FL)-WL," ");
  62. 410 PRINT CHR$(15);:W=25:RETURN
  63. 420 IF W$<>"@" THEN 440
  64. 430 CF=1:PRINT CHR$(15);:RETURN
  65. 440 PRINT CHR$(14);:IF W$=CHR$(24) THEN PRINT STRING$(WL,CHR$(24));:GOTO 370
  66. 450 IF W$<>CHR$(8) THEN 490 ELSE IF WL=0 THEN 390 ELSE PRINT CHR$(24);:IF FL>0 THEN 470 ELSE IF PEEK(16418)=44 THEN 480
  67. 460 IF PEEK(16418)=46 THEN WD=0:GOTO 470 ELSE IF PEEK(16418)=43 OR PEEK(16418)=45 THEN WS=0
  68. 470 IN$=LEFT$(IN$,LEN(IN$)-1)
  69. 480 WL=WL-1:POKE 16418,136:GOTO 390
  70. 490 IF ABS(FL)=WL THEN 390 ELSE IF FL>0 THEN IF W$>=" " AND W$<="z" THEN 540
  71. 500 IF W$="." AND WD=0 THEN WD=1:GOTO 540
  72. 510 IF W$="," THEN PRINT W$;:WL=WL+1:GOTO 550
  73. 520 IF (W$="-" OR W$="+") AND WS=0 AND WL=0 THEN WS=1:GOTO 540
  74. 530 IF W$<"0" OR W$>"9" THEN 390
  75. 540 PRINT W$;:IN$=IN$+W$:WL=WL+1
  76. 550 IF ABS(FL)=1 THEN 410 ELSE 390
  77. 560 CLS:PRINT TAB(20)"INPUT NEW ITEMS":PRINT
  78. 570 IF ER=1 THEN GOSUB 3060:RETURN
  79. 580 J=TN
  80. 590 IF TI=1000 THEN CLS:PRINT @ 468,"SYSTEM IS FULL (1000 ITEMS)":GOSUB 2480:RETURN ELSE PRINT @ A0,CHR$(30);:GOSUB 2510:GOSUB 350
  81. 600 IF FD<>0 THEN PRINT @ 295,"(LAST ENTRY: ";IS$;")";
  82. 610 FL=10:PRINT @ A0,;:GOSUB 370:IF CF=0 THEN IS$=IN$ ELSE 630
  83. 620 IF IS$<>"" THEN 640 ELSE 610
  84. 630 RETURN
  85. 640 GOSUB 360
  86. 650 FL=19:PRINT @ A1,;:GOSUB 370:IF CF=0 THEN ID$=IN$ ELSE 560
  87. 660 FL=-4:PRINT @ A2,;:GOSUB 370:IF CF=0 THEN IQ%=VAL(IN$) ELSE 560
  88. 670 FL=-7:PRINT @ A3,;:GOSUB 370:GOSUB 3750:IF CF=0 THEN IC=VAL(IN$):PRINT CHR$(30); ELSE ON CF GOTO 560,670
  89. 680 FL=-7:PRINT @ A4,;:GOSUB 370:GOSUB 3750:IF CF=0 THEN IP=VAL(IN$):PRINT CHR$(30); ELSE ON CF GOTO 560,680
  90. 690 GOSUB 2830
  91. 700 FL=10:PRINT @ A5,;:GOSUB 370:IF CF=0 THEN IL$=IN$ ELSE 560
  92. 710 FL=-4:PRINT @ A6,;:GOSUB 370:IF CF=0 THEN IR%=VAL(IN$) ELSE 560
  93. 720 PRINT " / ";:FL=-4:GOSUB 370:IF CF=0 THEN IN%=VAL(IN$) ELSE 560
  94. 730 FL=-4:PRINT @ A7,;:GOSUB 370:IF CF=0 THEN IO%=VAL(IN$) ELSE 560
  95. 740 FL=8:PRINT @ A8,;:GOSUB 370:IF CF=0 THEN IM$=IN$ ELSE 560
  96. 750 FL=6:PRINT @ A9,;:GOSUB 370:IF CF=0 THEN IV$=IN$ ELSE 560
  97. 760 P1=0:P2=0:GOSUB 3860
  98. 770 TC#=TC#+IC*IQ%:TP#=TP#+IP*IQ%:TR#=TR#+IO%*IC:TI=TI+1
  99. 780 FD=1:GOSUB 3130:GOSUB 2630:GOSUB 2660:GOSUB 2650:GOSUB 2540
  100. 790 GOSUB 2600:GOSUB 2560:TN=TN+1:J=TN:GOSUB 2510:GOTO 590
  101. 800 CLS:PRINT TAB(20)"ACCESS / UPDATE DATA":PRINT
  102. 810 IF ER=1 THEN GOSUB 3060:RETURN
  103. 820 PRINT @ A0,CHR$(31);:GOSUB 2510
  104. 830 GOSUB 2780:PRINT "ENTER STOCK # (TYPE @ TO EXIT) ----> ";
  105. 840 FL=10:GOSUB 370:IF CF=0 THEN IS$=IN$ ELSE 1270
  106. 850 GOSUB 2420
  107. 860 IF K=0 THEN PRINT @ AB,"ITEM NOT IN LISTING";:GOSUB 2500:GOSUB 2510:GOTO 830
  108. 870 GOSUB 2760
  109. 880 GOSUB 2780:PRINT "SELECT (U)PDATE, (S)EARCH, (N)EXT ITEM, (P)REVIOUS ITEM,
  110. :PRINT "(A)DJUST QTY, (D)ELETE, (@) TO EXIT TO MAIN MENU --> ";
  111. 890 FL=1:GOSUB 370:IF CF=1 THEN 1270 ELSE O$=IN$:IF O$<>"U" AND O$<>"S" AND O$<>"N" AND O$<>"P" AND O$<>"D" AND O$<>"A" THEN PRINT CHR$(8);:GOTO 890
  112. 900 IF O$="D" THEN 1210
  113. 910 IF O$="S" THEN 820
  114. 920 IF O$="U" THEN 970
  115. 930 IF O$="A" THEN 1240
  116. 940 IF O$="P" AND N<>1 THEN N=N-1:J=V(N):IF SGN(J)=-1 THEN 940 ELSE GOSUB 2630:GOSUB 2660:GOSUB 2670:GOSUB 2760:GOTO 880
  117. 950 IF O$="N" AND N+1<>TN THEN N=N+1:J=V(N):GOTO 960 ELSE PRINT CHR$(8);:GOTO 890
  118. 960 IF SGN(J)=-1 THEN 950 ELSE GOSUB 2630:GOSUB 2660:GOSUB 2670:GOSUB 2760:GOTO 880
  119. 970 GOSUB 2780:PRINT "SELECT LINE TO BE UPDATED (TYPE @ TO RESTART)--> ";
  120. 980 FL=-1:GOSUB 370:IF CF=0 THEN U$=IN$:IF U$<"1" OR U$>"9" THEN PRINT CHR$(8);:GOTO 980
  121. 990 IF CF<>0 THEN 880
  122. 1000 GOSUB 2780:ON VAL(U$) GOTO 1010,1030,1050,1070,1090,1110,1140,1160,1180
  123. 1010 GOSUB 2780:PRINT "1 - DESCRIPTION : ";
  124. 1020 FL=19:GOSUB 370:IF CF=0 THEN ID$=IN$:GOTO 1200 ELSE 990
  125. 1030 GOSUB 2780
  126. 1040 PRINT "2 - QUANTITY : ";:FL=-4:GOSUB 370:IF CF=0 THEN GOSUB 1280:IQ%=VAL(IN$):GOSUB 1290:GOTO 1200 ELSE 990
  127. 1050 GOSUB 2780
  128. 1060 PRINT "3 - COST : ";:FL=-7:GOSUB 370:GOSUB 3750:IF CF=0 THEN GOSUB 1280:IC=VAL(IN$):GOSUB 1290:PRINT CHR$(30);:GOTO 1200 ELSE ON CF GOTO 990,1050
  129. 1070 GOSUB 2780
  130. 1080 PRINT "4 - RETAIL PRICE : ";:FL=-7:GOSUB 370:GOSUB 3750:IF CF=0 THEN GOSUB 1280:IP=VAL(IN$):GOSUB 1290:PRINT CHR$(30);:GOTO 1200 ELSE ON CF GOTO 990,1070
  131. 1090 GOSUB 2780:PRINT "5 - LOCATION : ";
  132. 1100 FL=10:GOSUB 370:IF CF=0 THEN IL$=IN$:GOTO 1200 ELSE 990
  133. 1110 GOSUB 2780:PRINT "6 - REORDER POINT/QTY : ";
  134. 1120 FL=-4:GOSUB 370:IF CF=0 THEN IR%=VAL(IN$) ELSE 990
  135. 1130 PRINT " / ";:FL=-4:GOSUB 370:IF CF=0 THEN IN%=VAL(IN$):GOTO 1200 ELSE 990
  136. 1140 GOSUB 2780:PRINT "7 - # ON ORDER : ";
  137. 1150 FL=-4:GOSUB 370:IF CF=0 THEN GOSUB 1280:IO%=VAL(IN$):GOSUB 1290:GOTO 1200 ELSE 990
  138. 1160 GOSUB 2780:PRINT "8 - DATE LAST ORDER : ";
  139. 1170 FL=8:GOSUB 370:IF CF=0 THEN IM$=IN$:GOTO 1200 ELSE 990
  140. 1180 GOSUB 2780:PRINT "9 - VENDOR : ";
  141. 1190 FL=6:GOSUB 370:IF CF=0 THEN IV$=IN$:GOTO 1200 ELSE 990
  142. 1200 GOSUB 2560:GOSUB 2510:GOSUB 2860:GOTO 880
  143. 1210 V(N)=-J
  144. 1220 TI=TI-1:GOSUB 1280:F=F+1
  145. 1230 IF N+1=TN THEN PRINT @ A0,CHR$(31);:GOSUB 2510:GOTO 830 ELSE N=N+1:J=V(N):IF SGN(J)=1 THEN GOSUB 2630:GOSUB 2660:GOSUB 2670:GOTO 870 ELSE 1230
  146. 1240 GOSUB 2780:PRINT "ENTER + OR - AND CHANGE IN QUANTITY ---> ";
  147. 1250 FL=-4:GOSUB 370:IF CF=0 THEN CH$=IN$ ELSE 990
  148. 1260 IQ%=IQ%+VAL(CH$):TC#=TC#+IC*VAL(CH$):TP#=TP#+IP*VAL(CH$):GOTO 1200
  149. 1270 RETURN
  150. 1280 TC#=TC#-IQ%*IC:TP#=TP#-IQ%*IP:TR#=TR#-IO%*IC:RETURN
  151. 1290 TC#=TC#+IQ%*IC:TP#=TP#+IQ%*IP:TR#=TR#+IO%*IC:RETURN
  152. 1300 CLS:PRINT TAB(10)"ENTER RECEIPTS OF ON-ORDER ITEMS":PRINT :GOTO 1320
  153. 1310 CLS:PRINT TAB(15)"ENTER ITEMS PLACED ON ORDER":PRINT
  154. 1320 IF ER=1 THEN GOSUB 3060:RETURN
  155. 1330 PRINT @ A0,CHR$(31);:GOSUB 2510
  156. 1340 GOSUB 2780:PRINT "ENTER STOCK# (TYPE @ TO EXIT) ----> ";
  157. 1350 FL=10:GOSUB 370:IF CF=0 THEN IS$=IN$ ELSE 1270
  158. 1360 GOSUB 2420
  159. 1370 IF K=0 THEN PRINT @ AB,"ITEM NOT IN LISTING";:GOSUB 2500:GOSUB 2510:GOTO 1340
  160. 1380 GOSUB 2760
  161. 1390 IF S$="8" THEN 1490
  162. 1400 GOSUB 2780:PRINT "QUANTITY RECEIVED: ";
  163. 1410 FL=-4:GOSUB 370:IF CF=0 THEN GOSUB 1280:IQ%=IQ%+VAL(IN$):IO%=IO%-VAL(IN$) ELSE 1340
  164. 1420 GOSUB 2780:PRINT "CHANGE IN COST (HIT <ENTER> TO SKIP): ";
  165. 1430 FL=-7:GOSUB 370:IF CF<>0 THEN 1340 ELSE IF IN$="" THEN 1450 ELSE GOSUB 3750
  166. 1440 IF CF=0 THEN IC=VAL(IN$):PRINT CHR$(30); ELSE 1420
  167. 1450 GOSUB 2780:PRINT "CHANGE IN SELL PRICE (HIT <ENTER> TO SKIP): ";
  168. 1460 FL=-7:GOSUB 370:IF CF<>0 THEN 1340 ELSE IF IN$="" THEN 1480 ELSE GOSUB 3750
  169. 1470 IF CF=0 THEN IP=VAL(IN$):PRINT CHR$(30); ELSE 1450
  170. 1480 GOSUB 1290:GOSUB 2560:GOSUB 2510:GOSUB 2860:GOTO 1340
  171. 1490 GOSUB 2780:PRINT "QUANTITY ORDERED (HIT <ENTER> FOR DEFAULT QTY): ";
  172. 1500 FL=-4:GOSUB 370:IF CF<>0 THEN 1340 ELSE GOSUB 1280:IF IN$="" THEN IO%=IO%+IN% ELSE IO%=IO%+VAL(IN$)
  173. 1510 GOSUB 2780:PRINT "DATE OF ORDER (HIT <eNTER> FOR LAST ENTERED DATE): ";
  174. 1520 FL=8:GOSUB 370:IF IN$<>"" THEN IP$=IN$:IM$=IN$:GOTO 1480 ELSE IM$=IP$:GOTO 1480
  175. 1530 CLS:PRINT TAB(15)"OUTPUT REPORTS AND SUMMARIES":PRINT
  176. 1540 IF ER=1 THEN GOSUB 3060:RETURN
  177. 1550 PRINT "OPTIONS:
  178. :PRINT "
  179. :PRINT "1 - PRINTOUT COMPLETE LISTING
  180. :PRINT "2 - PRINTOUT OF NOT-IN-STOCK ITEMS
  181. :PRINT "3 - PRINTOUT ALL ITEMS ON ORDER
  182. :PRINT "4 - PRINTOUT ALL ITEMS AT OR BELOW REORDER POINT
  183. :PRINT "5 - PRINTOUT BY VENDOR
  184. :PRINT "6 - PRINTOUT BY PREFIX / SUFFIX"
  185. 1560 PRINT "7 - PRINT SUGGESTED PURCHASE ORDER TO VENDOR
  186. :PRINT "8 - TEST PRINTER
  187. :PRINT "@ - EXIT TO MAIN MENU"
  188. 1570 PRINT :PRINT "SELECT OPTION --> ";
  189. 1580 FL=-1:GOSUB 370:IF CF=1 THEN RETURN ELSE O$=IN$:IF O$<"1" OR O$>"8" THEN PRINT CHR$(8);:GOTO 1580
  190. 1590 GOSUB 3730:IF XX=1 THEN 1530
  191. 1600 GOSUB 3000
  192. 1610 O=VAL(O$):IF O=8 THEN FOR T=0 TO 131:LPRINT "*";:NEXT :CLS:GOTO 1530
  193. 1620 GOSUB 2960:IF O<>7 THEN GOSUB 2970:GOSUB 3000
  194. 1630 ON O GOSUB 3250,3270,3290,3310,3330,3360,3430
  195. 1640 IF O<>7 THEN GOSUB 2890 ELSE GOSUB 3780
  196. :FOR N=1 TO TN-1
  197. 1650 J=V(N):IF SGN(J)=-1 THEN 1680
  198. 1660 ON O GOSUB 3260,3280,3300,3320,3350,3400,3450
  199. 1670 REM EN$=INKEY$:IF EN$="@" THEN LPRINT " ":LPRINT " * TERMINATED *":POKE 16425,1:GOTO 1530
  200. 1680 NEXT
  201. 1690 IF O<>1 AND O<>3 AND O<>7 AND O<>5 AND O<>6 THEN 1770
  202. 1700 IF O=3 THEN 1760
  203. 1710 IF O=7 THEN 3830
  204. 1720 IF O=5 OR O=6 THEN 3480
  205. 1725 IF GI<>TI AND GC#<>TC# AND GP#<>TP# AND GR#<>TR# THEN GOSUB 4050
  206. 1730 GI=0:GC#=0:GP#=0:GR#=0:LPRINT " ":LPRINT "TOTAL ITEMS LISTED:";TAB(25)TI
  207. 1740 IF CC=0 THEN LPRINT "TOTAL COST VALUE:";TAB(25);:LPRINT USING L6$;TC#
  208. 1750 LPRINT "TOTAL RETAIL VALUE:";TAB(25);:LPRINT USING L6$;TP#
  209. 1760 IF CC=0 THEN LPRINT " ":LPRINT "TOTAL COST OF ORDERS:";TAB(25);:LPRINT USING L6$;TR#
  210. 1770 GOSUB 3240:CLS:GOTO 1530
  211. 1780 GOSUB 2630:GOSUB 2660:GOSUB 2670:RETURN
  212. 1790 GOSUB 2540:GOSUB 2600:GOSUB 2610:GOSUB 4000:RETURN
  213. 1800 CLS:PRINT TAB(20)"CREATE NEW INVENTORY"
  214. 1810 IF ER=0 THEN PRINT @ 448,"SYSTEM CONTAINS INVENTORY DATA. IF YOU WISH TO THEN ERASE ALL DATA,
  215. :PRINT "TYPE (SHIFT) K OR ELSE TYPE @ TO RETURN TO MAIN MENU --> "; ELSE 1840
  216. 1820 FL=1:GOSUB 370:IF CF=1 THEN RETURN ELSE T$=IN$:IF T$<>"k" THEN PRINT CHR$(8);:GOTO 1820
  217. 1830 CLOSE :KILL PI$:KILL PD$:KILL PT$:KILL PS$:KILL PR$:CLS:PRINT @ 468,"ALL DATA ERASED":ER=1:PRINT :PRINT :GOSUB 2480:RETURN
  218. 1840 TC#=0:TP#=0:TR#=0:TI=0:TN=1:HI=0:HN=1:F=0:ER=0:GOSUB 2530
  219. 1850 PRINT @ 460,"SYSTEM READY FOR NEW INVENTORY"
  220. 1860 PRINT :PRINT :GOSUB 2480:RETURN
  221. 1870 CLS:PRINT TAB(21)"ENTER SALES TICKETS":PRINT
  222. 1880 IF ER=1 THEN GOSUB 3060:RETURN
  223. 1890 GOSUB 2350:H=HN:HC=0
  224. 1900 IF HI<1000 THEN 1910
  225. 1901 CLS
  226. 1902 PRINT @ 448,"SALES FILE IS FULL (1000 ITEMS). USE FUNCTION 6 TO"
  227. 1903 PRINT "POST SALES AND CLEAR THE FILE."
  228. 1904 CLOSE 1
  229. 1905 GOSUB 2500
  230. 1906 RETURN
  231. 1910 GOSUB 350
  232. 1920 PRINT @ 256," " ' CHR$(31);
  233. 1930 IF HC<>0 THEN PRINT @ 295,"(LAST ENTRY: ";HA$;")";
  234. 1940 PRINT @ 256,"STOCK NUMBER: ";
  235. 1950 FL=10:GOSUB 370:IF CF=0 THEN HA$=IN$ ELSE CLOSE 1:RETURN
  236. 1960 GOSUB 360:PRINT @ 384,"QUANTITY SOLD: ";
  237. 1970 FL=-4:GOSUB 370:IF CF=0 THEN HB=VAL(IN$) ELSE 1910
  238. 1980 GOSUB 2360:GOSUB 2400:GOSUB 2380
  239. 1990 HI=HI+1:HN=HN+1:H=HN:HC=1:GOTO 1900
  240. 2000 CLS:PRINT TAB(20)"END OF PERIOD PROCESSING":PRINT
  241. 2010 IF ER=1 THEN GOSUB 3060:RETURN
  242. 2020 PRINT @ 128,"FUNCTIONS:"
  243. :PRINT "
  244. :PRINT "1 - POST SALES TICKETS AND CLEAR TICKET FILE
  245. :PRINT "
  246. :PRINT "2 - CLEAR CURRENT SALES FIGURES FROM INVENTORY
  247. :PRINT "
  248. :PRINT "3 - CLEAR CURRENT AND CUMULATIVE SALES FIGURES FROM INVENTORY
  249. :PRINT "
  250. :PRINT "@ - EXIT TO MAIN MENU
  251. :PRINT "
  252. 2030 PRINT "SELECT FUNCTION > ";
  253. 2040 FL=-1:GOSUB 370:IF CF=1 THEN RETURN ELSE HO$=IN$:IF HO$<"1" OR HO$>"3" THEN PRINT CHR$(8);:GOTO 2040
  254. 2045 IF VAL(HO$)>1 THEN PRINT " ARE YOU SURE (Y/N)";:FL=1:GOSUB 370:IF IN$<>"Y" THEN 2000
  255. 2050 ON VAL(HO$) GOTO 2060,2260,2280
  256. 2060 GOSUB 3730:IF XX=1 THEN 2000
  257. 2070 IF HI=0 THEN CLS:PRINT @ 460,"NO UNPOSTED SALES TICKETS IN FILE":GOSUB 2500:GOTO 2000 ELSE GOSUB 2190
  258. 2080 CLS:PRINT @ 468,"pOSTING IN PROGRESS"
  259. 2090 GOSUB 2350:HT=HI:HC#=0
  260. 2100 FOR H=1 TO HI
  261. 2110 GOSUB 2360:GOSUB 2400:GOSUB 2410:IS$=HA$
  262. 2120 GOSUB 2420:IF K=0 THEN GOSUB 2200:GOTO 2170
  263. 2130 GOSUB 2540:GOSUB 2600:GOSUB 2610
  264. 2140 P1=P1+HB:P2=P2+HB:HC#=HC#+HB*IC
  265. 2150 IQ%=IQ%-HB:TC#=TC#-HB*IC:TP#=TP#-HB*IP:IF IQ%<0 THEN GOSUB 2220
  266. 2160 GOSUB 2560:HT=HT-1:PRINT @ 596,"TICKETS REMAINING: ";HT
  267. 2170 NEXT :GOSUB 2230
  268. 2180 HI=0:HN=1:CLOSE 1:KILL PR$:GOTO 2000
  269. 2190 GOSUB 2960:LPRINT TAB(30)"SALES TICKET POSTING REPORT":LPRINT LF$:RETURN
  270. 2200 LPRINT "E R R O R : STOCK # ";HA$;" IS NOT IN INVENTORY LISTING AND WAS NOT POSTED":LPRINT LF$
  271. 2210 RETURN
  272. 2220 LPRINT "N O T E : STOCK # ";HA$;" NOW HAS A QUANTITY OF ";IQ%:LPRINT LF$:RETURN
  273. 2230 LPRINT "NUMBER OF ITEMS POSTED: ";HI-HT
  274. 2240 LPRINT "TOTAL COST OF GOODS SOLD: "; USING L6$;HC#
  275. 2250 GOSUB 3240:RETURN
  276. 2260 CLS:PRINT @ 463,"CLEARING CURRENT SALES FIGURES"
  277. 2270 GOSUB 2300:GOTO 2000
  278. 2280 CLS:PRINT @ 460,"CLEARING CURRENT AND CUMULATIVE SALES FIGURES"
  279. 2290 GOSUB 2300:GOTO 2000
  280. 2300 FOR J=1 TO TN-1
  281. 2310 GOSUB 2540:GOSUB 2600:GOSUB 2610
  282. 2320 IF HO$="3" THEN P2=0
  283. 2330 P1=0
  284. 2340 GOSUB 2560:NEXT :RETURN
  285. 2350 OPEN "R",1,PR$,PR%
  286. 2355 RETURN
  287. 2360 HR = H : HD = 0 ' HR=INT((H-1)/20)+1:HD=H-20*INT((H-1)/20)-1
  288. 2370 FIELD 1,10 AS H1$,ZINT AS H2$:RETURN
  289. 2380 LSET H1$=HA$:RSET H2$=MKI$(HB)
  290. 2390 PUT 1,HR:RETURN
  291. 2400 GET 1,HR:RETURN
  292. 2410 HA$=H1$:HB=CVI(H2$):RETURN
  293. 2420 NL=0:NH=TN
  294. 2430 K=INT((NH-NL)/2):IF K=0 THEN RETURN ELSE N=K+NL
  295. 2435 IF N=NH THEN NH=INT((NH-NL)/2)+NL:GOTO 2430 ELSE IF V(N)<0 THEN N=N+1:GOTO 2435
  296. 2440 J=ABS(V(N)):GOSUB 2630:GOSUB 2660:IF IS$+STRING$(10-LEN(IS$)," ")=N$ THEN IS$=N$:GOTO 2470
  297. 2450 IF IS$+STRING$(10-LEN(IS$)," ")<N$ THEN NH=N:GOTO 2430
  298. 2460 NL=N:GOTO 2430
  299. 2470 IF SGN(V(N))=-1 THEN K=0:RETURN ELSE RETURN
  300. 2480 PRINT TAB(10)"TYPE @ TO RETURN TO MAIN MENU --> ";
  301. 2490 FL=1:GOSUB 370:IF CF=1 THEN RETURN ELSE PRINT CHR$(8);:GOTO 2490
  302. 2500 FOR T=1 TO 2500:NEXT :RETURN
  303. 2510 PRINT @ 256,"0 - STOCK # -------->
  304. :PRINT "1 - DESCRIPTION ---->
  305. :PRINT "2 - QUANTITY ------->
  306. :PRINT "3 - COST ----------->
  307. :PRINT "4 - SELL ----------->
  308. :PRINT "5 - LOCATION ------->
  309. :PRINT "6 - REORDER PT/QTY-->
  310. :PRINT "7 - # ON ORDER ----->
  311. :PRINT "8 - DATE LAST ORDER->
  312. :PRINT "9 - VENDOR --------->";CHR$(31);
  313. 2520 RETURN
  314. 2530 OPEN "R",2,PD$,PD%
  315. 2535 OPEN "R",3,PS$,PS%
  316. 2537 RETURN
  317. 2540 JR = J : JD = 0 ' JR=INT((J-1)/4)+1:JD=J-4*INT((J-1)/4)-1
  318. 2550 FIELD 2, 19 AS FD$, ZINT AS FQ$, ZSNG AS FC$, ZSNG AS FP$, 10 AS FL$, ZINT AS FR$, ZINT AS FA$, ZINT AS FO$, 8 AS FM$, 6 AS FV$, ZINT AS P1$, ZINT AS P2$:RETURN
  319. 2560 LSET FD$=ID$:RSET FQ$=MKI$(IQ%):RSET FC$=MKS$(IC)
  320. 2570 RSET FP$=MKS$(IP):LSET FL$=IL$:RSET FR$=MKI$(IR%):RSET FA$=MKI$(IN%)
  321. 2580 RSET FO$=MKI$(IO%):LSET FM$=IM$:LSET FV$=IV$:RSET P1$=MKI$(P1):RSET P2$=MKI$(P2)
  322. 2590 PUT 2,JR:RETURN
  323. 2600 GET 2,JR:RETURN
  324. 2610 ID$=FD$
  325. 2611 IQ%=CVI(FQ$)
  326. 2612 IC=CVS(FC$)
  327. 2613 IP=CVS(FP$)
  328. 2614 IL$=FL$
  329. 2620 IR%=CVI(FR$)
  330. 2621 IN%=CVI(FA$)
  331. 2622 IO%=CVI(FO$)
  332. 2623 IM$=FM$
  333. 2624 IV$=FV$
  334. 2625 P1=CVI(P1$)
  335. 2626 P2=CVI(P2$)
  336. 2627 RETURN
  337. 2630 JR = J : JD = 0 ' JR=INT((J-1)/25)+1:JD=J-25*INT((J-1)/25)-1
  338. 2640 FIELD 3, 10 AS N$:RETURN
  339. 2650 LSET N$=IS$:PUT 3,JR:RETURN
  340. 2660 GET 3,JR:RETURN
  341. 2670 IS$=N$:RETURN
  342. 2680 OPEN "I",1,PI$,PI%
  343. 2685 OPEN "I",3,PT$,PT%
  344. 2690 INPUT #3,TC#,TP#,TR#,TI,HI:CLOSE 3
  345. 2700 INPUT #1,TN,HN,F
  346. 2710 FOR N=1 TO TN-1:INPUT #1,V(N):NEXT :CLOSE 1:RETURN
  347. 2720 OPEN "O",1,PI$,PI%
  348. 2730 WRITE #1,TN,HN,F
  349. 2740 FOR N=1 TO TN-1:WRITE #1,V(N):NEXT :CLOSE 1:RETURN
  350. 2750 OPEN "O",3,PT$,PT%
  351. 2755 WRITE #3,TC#,TP#,TR#,TI,HI:CLOSE 3:RETURN
  352. 2760 PRINT @ A0,CHR$(30);:GOSUB 2510:GOSUB 2540:GOSUB 2600:GOSUB 2610:PRINT @ A0,IS$;:GOSUB 2860:RETURN
  353. 2770 DATA 281,345,409,473,537,601,665,729,793,857,128,490,960
  354. 2780 PRINT @ AA,CHR$(30):PRINT CHR$(30);:PRINT @ AA,;:RETURN
  355. 2790 DATA "####"
  356. 2800 DATA "####.##" ' HERE-HERE-HERE
  357. 2810 DATA "$$###,####.##"
  358. 2820 DATA "###.#"
  359. 2830 IF IP<>0 THEN PRINT @ 552,"GROSS PROFIT= ";:PRINT USING L7$;FNGP(IC,IP);:PRINT " %";:RETURN ELSE RETURN
  360. 2840 IF CC=1 THEN LPRINT " ****";:RETURN
  361. 2850 IF IP<>0 THEN LPRINT " "; USING L7$;FNGP(IC,IP);:RETURN ELSE RETURN
  362. 2860 PRINT @ A1,ID$:PRINT @ A2,IQ%:PRINT @ A3, USING L1$;IC:PRINT @ A4, USING L1$;IP:GOSUB 2830
  363. 2870 PRINT @ A5,IL$:PRINT @ A6,IR%;"/";IN%:PRINT @ A7,IO%:PRINT @ A8,IM$:PRINT @ A9, IV$:GOSUB 3860
  364. 2880 RETURN
  365. 2890 LPRINT "STOCK # DESCRIPTION QTY COST SELL GP % LOCATION R/O PT / QTY ON ORDER DATE VENDOR CURR / CUML"
  366. 2900 LPRINT "======= =========== === ==== ==== ==== ======== ===== ==== ======== ==== ====== ==== ===="
  367. 2910 LPRINT " ":RETURN
  368. 2915 REM FUNKY USING ERROR
  369. 2920 GOSUB 3720:LPRINT IS$;TAB(12)ID$;TAB(33);:LPRINT USING L0$;IQ%;:LPRINT TAB(39);:IF CC=0 THEN LPRINT USING L1$;IC; ELSE LPRINT " ****";
  370. 2930 LPRINT TAB(48);USING L1$;IP;:GOSUB 2840
  371. 2940 LPRINT TAB(63)IL$;" ";:LPRINT USING L0$;IR%;:LPRINT " / ";:LPRINT USING L0$;IN%;:LPRINT " ";:LPRINT USING L0$;IO%;:LPRINT " ";IM$;" ";IV$;" "; USING L0$;P1;:LPRINT " / "; USING L0$;P2
  372. 2950 RETURN
  373. 2960 LPRINT LL$:LPRINT LF$:LPRINT LF$:LPRINT LEFT$(TIME$,8):LPRINT LF$:RETURN
  374. 2970 CLS:PRINT @ 456,"DO YOU WANT TO SUPPRESS COST AND PROFIT FIGURES ? ";
  375. 2980 FL=1:GOSUB 370:IF IN$<>"Y" AND IN$<>"N" THEN PRINT CHR$(8);:GOTO 2980
  376. 2990 IF IN$="N" THEN CC=0:RETURN ELSE CC=1:RETURN
  377. 3000 PRINT @ 128,CHR$(31):PRINT @ 470,"** PRINTING **":RETURN
  378. 3010 GOSUB 2680:IF ER=1 THEN RESUME 3050
  379. 3020 PRINT @ 128,CHR$(31);
  380. 3030 GOSUB 2530
  381. 3040 GOTO 240
  382. 3050 PRINT @ 448,CHR$(30);CHR$(29);"NO DATA IN SYSTEM. USE FUNCTION 4 OF MENU TO CREATE INVENTORY.":PRINT :GOSUB 2480:GOTO 240
  383. 3060 PRINT @ 458,"NO DATA IN SYSTEM! USE FUNCTION 4 FIRST!":GOSUB 2500:RETURN
  384. 3070 PRINT :PRINT "NUMBER OF ITEMS CURRENTLY IN LISTING: ";TI
  385. 3080 PRINT "NUMBER OF UNPOSTED SALES TICKETS: ";HI
  386. 3090 PRINT "TOTAL COST (WHOLESALE) VALUE: ";:PRINT USING L6$;TC#
  387. 3100 PRINT "TOTAL RETAIL SALE VALUE ----: ";:PRINT USING L6$;TP#
  388. 3110 PRINT "TOTAL VALUE OF ITEMS ORDERED: ";:PRINT USING L6$;TR#
  389. 3120 RETURN
  390. 3130 IF F=0 THEN V(J)=J:RETURN
  391. 3140 FOR N=1 TO TN-1
  392. 3150 IF SGN(V(N))=-1 THEN V(N)=ABS(V(N)):J=V(N):TN=TN-1:F=F-1:RETURN
  393. 3160 NEXT :F=0:V(J)=J:RETURN
  394. 3170 PI$="INDEXFIL"
  395. :PD$="DATAFILE"
  396. :PT$="INFOFILE"
  397. :PS$="STOCKNUM"
  398. :PR$="SALEDATA"
  399. 3175 ZINT = LEN(MKI$(0))
  400. :ZSNG = LEN(MKS$(0))
  401. :PI%=80
  402. :PD%=19 + ZINT + ZSNG + ZSNG + 10 + ZINT + ZINT + ZINT + 8 + 6 + ZINT + ZINT
  403. :PT%=80
  404. :PS%=10
  405. :PR%=10 + ZINT
  406. :RETURN
  407. 3180 PRINT @ 472,"ENTER PASSWORD ---> ";
  408. 3185 INPUT P$ : RETURN
  409. 3190 P$="":FOR X=1 TO 8
  410. 3200 PE$=INKEY$:IF PE$="" THEN 3200 ELSE IF PE$<" " OR PE$>"Z" THEN 3220
  411. 3210 P$=P$+PE$:PRINT "#";:GOTO 3230
  412. 3220 IF ASC(PE$)=13 THEN RETURN ELSE 3200
  413. 3230 NEXT :RETURN
  414. 3240 LPRINT " ":LPRINT "END OF LISTING":LPRINT LL$:LPRINT CHR$(12):RETURN
  415. 3250 LPRINT TAB(30)"COMPLETE INVENTORY LISTING":LPRINT " ":RETURN
  416. 3260 GOSUB 1780
  417. :GOSUB 1790
  418. :GOSUB 2920
  419. :RETURN
  420. 3270 LPRINT TAB(30)"LISTING OF NOT-IN-STOCK ITEMS":LPRINT " ":RETURN
  421. 3280 GOSUB 1790:IF IQ%>0 THEN RETURN ELSE GOSUB 1780:GOSUB 2920:RETURN
  422. 3290 LPRINT TAB(30)"LISTING OF ALL ITEMS ON ORDER":LPRINT " ":RETURN
  423. 3300 GOSUB 1790:IF IO%=0 THEN RETURN ELSE GOSUB 1780:GOSUB 2920:RETURN
  424. 3310 LPRINT TAB(30)"LISTING OF ALL ITEMS AT OR BELOW REORDER POINT":LPRINT " ":RETURN
  425. 3320 GOSUB 1790:IF IQ%>IR% THEN RETURN ELSE GOSUB 1780:GOSUB 2920:RETURN
  426. 3330 GOSUB 3530:GOSUB 3000
  427. 3340 LPRINT TAB(30)"LISTING BY VENDOR: ";IX$:LPRINT " ":GOSUB 3460:RETURN
  428. 3350 GOSUB 1790:IF LEFT$(IV$,LEN(IX$))<>IX$ THEN RETURN ELSE GOSUB 1780:GOSUB 3470:GOSUB 2920:RETURN
  429. 3360 CLS:GOSUB 3460:PRINT @ 468,"(P)REFIX OR (S)UFFIX ? "
  430. 3370 S$=INKEY$:IF S$<>"P" AND S$<>"S" THEN 3370
  431. 3380 IF S$="P" THEN PRINT @ 532,"ENTER PREFIX --> ";:FL=10:GOSUB 370:K$=IN$:GOSUB 3000:LPRINT TAB(30)"LISTING BY PREFIX: ";K$:LPRINT " ":RETURN
  432. 3390 PRINT @ 532,"ENTER SUFFIX --> ";:FL=10:GOSUB 370:K$=IN$:GOSUB 3000:LPRINT TAB(30)"LISTING BY SUFFIX: ";K$:LPRINT " ":RETURN
  433. 3400 GOSUB 1780:IF S$="S" THEN 3420
  434. 3410 IF LEFT$(IS$,LEN(K$))<>K$ THEN RETURN ELSE GOSUB 1790:GOSUB 3470:GOSUB 2920:RETURN
  435. 3420 IF RIGHT$(IS$,LEN(K$))<>K$ THEN RETURN ELSE GOSUB 1790:GOSUB 3470:GOSUB 2920:RETURN
  436. 3430 GOSUB 3530:GOSUB 3000
  437. 3440 LPRINT TAB(20)"SUGGESTED PURCHASE ORDER TO VENDOR: ";IX$:LPRINT " ":TT=0:T1#=0:RETURN
  438. 3450 GOSUB 1790:IF LEFT$(IV$,LEN(IX$))<>IX$ OR IQ%>IR% OR IR%<(IO%+IQ%) THEN RETURN ELSE GOSUB 1780:GOSUB 3800:RETURN
  439. 3460 TT=0:T1#=0:T2#=0:T3#=0:RETURN
  440. 3470 TT=TT+1:T1#=T1#+IQ%*IC:T2#=T2#+IQ%*IP:T3#=T3#+IO%*IC:RETURN
  441. 3480 LPRINT " ":LPRINT "NUMBER OF ITEMS:";TAB(25)TT
  442. 3490 IF CC=0 THEN LPRINT "TOTAL COST VALUE:";TAB(25) USING L6$;T1#
  443. 3500 LPRINT "TOTAL RETAIL VALUE:";TAB(25) USING L6$;T2#
  444. 3510 IF CC=0 THEN LPRINT "TOTAL COST OF ORDERS:";TAB(25) USING L6$;T3#
  445. 3520 GOSUB 3240:CLS:GOTO 1540
  446. 3530 CLS:PRINT @ 450,"ENTER ENOUGH LETTERS TO IDENTIFY VENDOR --> ";
  447. 3540 FL=6:GOSUB 370:IX$=IN$:RETURN
  448. 3550 REM ------------------------------------------------------
  449. 3555 IF ERR/2+1=54 THEN ER=1:RETURN
  450. 3560 IF ERR/2+1=57 THEN 3610
  451. 3570 IF ERR/2+1=68 THEN CLS:CLOSE :PRINT @ 458,"NO DISK IN DRIVE #1 - RUN TERMINATED":CLEAR 50:PRINT :PRINT :END
  452. 3580 IF ERR/2+1=70 THEN CLS:PRINT @ 465,"UNAUTHORIZED ACCESS TO INVENTORY SYSTEM
  453. :PRINT ""TAB(28)"RUN TERMINATED":PRINT :CLEAR 50:END
  454. 3590 PRINT :PRINT CHR$(30);"UNEXPECTED ERROR CODE ";ERR/2+1;"IN LINE";ERL:GOSUB 2500:GOTO 330
  455. 3600 ON ERROR GOTO 0
  456. 3610 CLS:PRINT @ 404,"** DISK I/O ERROR **":TE=TE+1
  457. 3620 PRINT @ 586,"TOTAL I/O ERRORS THIS RUN: ";TE
  458. 3630 PRINT @ 650,"THIS ERROR OCCURRED IN LINE";ERL
  459. 3640 PRINT @ 778,"(T)RY AGAIN OR (E)XIT FROM PROGRAM ? ";
  460. 3650 FL=1:GOSUB 370:IF IN$<>"T" AND IN$<>"E" THEN PRINT CHR$(8);:GOTO 3650
  461. 3660 IF IN$="T" THEN RESUME ELSE 330
  462. 3670 OPEN "O",1,"TRANSFER"
  463. 3680 PRINT #1,PI$:PRINT #1,PS$:PRINT #1,PD$:PRINT #1,PT$:PRINT #1,PR$
  464. 3690 CLOSE 1:CLEAR 50
  465. 3700 PRINT "*** RUNNING DATASORT ***":RUN "DATASORT.BAS"
  466. 3710 END
  467. 3720 IF PEEK(&H4029)<58 THEN RETURN ELSE LPRINT CHR$(12):GOSUB 2960:GOSUB 2890:RETURN
  468. 3730 IF PEEK(14312)<=127 THEN XX=0:RETURN
  469. 3740 CLS:PRINT @ 468,"PRINTER NOT READY !!":XX=1:GOSUB 2500:CLS:RETURN
  470. 3750 IF CF<>0 THEN RETURN
  471. 3760 IF LEN(IN$)>=3 THEN IF MID$(IN$,LEN(IN$)-2,1)="." THEN RETURN
  472. 3770 PRINT " INVALID FORMAT !";:FOR T=1 TO 1000:NEXT :CF=2:RETURN
  473. 3780 LPRINT " QTY STOCK # DESCRIPTION COST EXTENSION"
  474. 3790 LPRINT " === ======== =========== ==== =========":LPRINT " ":RETURN
  475. 3800 TT=TT+1:T1#=T1#+IN%*IC
  476. 3810 LPRINT USING L0$;IN%;:LPRINT TAB(12)IS$;TAB(27)ID$;:LPRINT TAB(48) USING L1$;IC;:LPRINT TAB(60) USING L6$;IN%*IC
  477. 3820 RETURN
  478. 3830 LPRINT " ":LPRINT "TOTAL ITEMS:";TT
  479. 3840 LPRINT "TOTAL COST OF ORDER:";TAB(20) USING L6$;T1#
  480. 3850 GOSUB 3240:CLS:GOTO 1540
  481. 3860 PRINT @ 616,"CURRENT SALES : ";P1;
  482. 3870 PRINT @ 680,"CUMULATIVE SALES: ";P2;
  483. 3880 RETURN
  484. 4000 GC#=GC#+IQ%*IC:GP#=GP#+IQ%*IP:GR#=GR#+IO%*IC:GI=GI+1:RETURN
  485. 4050 TI=GI:TC#=GC#:TP#=GP#:TR#=GR#:RETURN
  486. 5000 REM -----------------------------------
  487. 5010 REM CHECK FOR MISSING FILES
  488. 5020 REM -----------------------------------
  489. 5100 IF ERL = 45 THEN RESUME 110
  490. 5110 IF ERL = 2611 THEN IQ%=0 : RESUME NEXT
  491. 5120 IF ERL = 2612 THEN IC =0 : RESUME NEXT
  492. 5130 IF ERL = 2613 THEN IP =0 : RESUME NEXT
  493. 5140 IF ERL = 2620 THEN IR%=0 : RESUME NEXT
  494. 5150 IF ERL = 2621 THEN IN%=0 : RESUME NEXT
  495. 5160 IF ERL = 2622 THEN IO%=0 : RESUME NEXT
  496. 5170 IF ERL = 2625 THEN P1 =0 : RESUME NEXT
  497. 5180 IF ERL = 2626 THEN P2 =0 : RESUME NEXT
  498. 5300 PRINT:PRINT "UNEXPECTED ERROR CODE";ERR;"IN LINE";ERL
  499. 5310 IF ERL = 2350 THEN PRINT "MISSING RANDOM FILE:";PR$
  500. 5320 IF ERL = 2530 THEN PRINT "MISSING RANDOM FILE:";PD$
  501. 5330 IF ERL = 2535 THEN PRINT "MISSING RANDOM FILE:";PS$
  502. 5340 IF ERL = 2680 THEN PRINT "MISSING INPUT FILE:";PI$
  503. 5350 IF ERL = 2685 THEN PRINT "MISSING INPUT FILE:";PT$
  504. 5360 IF ERL = 2720 THEN PRINT "MISSING OUTPUT FILE:";PI$
  505. 5370 IF ERL = 2750 THEN PRINT "MISSING OUTPUT FILE:";PT$
  506. 5380 IF ERL = 3670 THEN PRINT "MISSING OUTPUT FILE:";"TRANSFER"
  507. 9999 END