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.
 
 
 
 
 
 

295 lines
10 KiB

  1. 1 rem This is the Finished Goods Inventory Entry Program
  2. %INCLUDE ALL.BAS
  3. 500 RESTORE
  4. 520 L$="$##,###.###"
  5. 525 U$="##########"
  6. 530 DIM K$(6,20),n(2,20)
  7. repeat$="-------------------------------"
  8. fill$=" "
  9. z5$="fg"
  10. z6$="fgback":z7$=z5$+"size"
  11. 535 FOR Z=1 TO 72:delim$=delim$+"=":NEXT Z
  12. 540 K$(6,1)="1 - NEW ENTRY":K$(6,2)="2 - EXAMINE EXISTING ENTRY"
  13. 550 K$(6,3)="3 - MODIFY EXISTING ENTRY"
  14. 560 K$(6,4)="4 - DELETE EXISTING ENTRY"
  15. 570 K$(6,5)="5 - CREATE NEW FILE":K$(6,6)="6 - CLEAR EXISTING FILE"
  16. 580 K$(6,7)="7 - BACK-UP AND SORT FILE":K$(6,8)="8 - LIST FILE"
  17. 590 K$(6,9)="9 - FINISHED"
  18. print clear$:print
  19. for z=1 to 19:read k$(1,z):next z
  20. for z=1 to 20:read k$(2,z):next z
  21. for z=1 to 19:read n(1,z):next z
  22. data Tag,Acct Number,Item #,Part #,Description,Location(shelf-bin)
  23. data Date of Last Issue,Date of Last Receipt,Vendor Code,Vendor Tag #
  24. data Unit Cost,Selling Price,Quan on Hand,Quan on Order,Quan Issued M-T-D
  25. data Quan Issued Q-T-D,Quan Issued Y-T-D,Min Quan (stock),Max Quan (stock)
  26. data 1 - Tag,2 - Acct Number,3 - Item #,4 - Part #,5 - Description
  27. data 6 - Loc (shelf-bin),7 - Date of Last Issue,8 - Date Last Receipt
  28. data 9 - Vendor Code,10- Vendor Tag #,11- Unit Cost,12- Selling Price
  29. data 13- Quan on hand,14- Quan on Order,15- Quan Issued M-T-D
  30. data 16- Quan Issued Q-T-D,17- Quan Issued Y-T-D,18- Min Quan (stock)
  31. data 19- Max Quan (stock),20- None
  32. data 4,10,7,12,24,24,8,8,10,4,12,12,8,8,10,10,10,10,10
  33. restore
  34. print clear$:print
  35. 1500 if end #1 then 6000
  36. if end #2 then 15000
  37. open z5$ recl 256 as 1
  38. close 1
  39. open z7$ as 2
  40. read #2;z2,z3
  41. close 2
  42. 1600 REM
  43. console
  44. 1620 PRINT CLEAR$
  45. if z2>z3 then print "*** OUT OF RECORD SPACE ***"
  46. PRINT "FINISHED GOODS INVENTORY ENTRY PROGRAM"
  47. PRINT "--------------------------------------"
  48. PRINT:PRINT "THERE ARE ";Z3;" AVAILABLE RECORDS"
  49. PRINT "OF THESE THERE ARE:";TAB(30);(Z3-Z2)+1;" RECORDS OPEN"
  50. PRINT ;TAB(30);Z2-1;" RECORDS USED"
  51. PRINT
  52. 1650 PRINT "THIS IS A LIST OF OPERATIONS."
  53. 1655 PRINT
  54. 1660 FOR Z=1 TO 9:PRINT K$(6,Z):NEXT Z:PRINT
  55. 1665 PRINT "INDICATE WHAT YOU WOULD LIKE TO DO BY TYPING"
  56. 1670 PRINT "THE CORRESPONDING NUMBER."
  57. 1675 PRINT
  58. 1680 INPUT Z
  59. IF Z<1 OR Z>9 then 1620
  60. 1682 IF Z=1 THEN new$="N"
  61. 1685 ON Z GOSUB 2000,3000,4000,5000,6000,7000,8000,9000,10000
  62. 1690 FOR Z=1 TO 20:N(2,Z)=0:NEXT Z:N$=""
  63. 1700 FOR Z=1 TO 20:K$(3,Z)="":NEXT Z
  64. 1702 new$=""
  65. 1705 GOTO 1600
  66. 2000 IF Z2>Z3 THEN RETURN
  67. 2001 PRINT CLEAR$:PRINT
  68. 2005 PRINT "RECORD NUMBER";Z2:PRINT
  69. 2015 FOR Z=1 TO 2
  70. PRINT CUR$
  71. 2020 PRINT TAB(30);left$(repeat$,n(1,z))
  72. PRINT UP$;
  73. 2025 PRINT K$(1,Z);TAB(30);
  74. 2030 INPUT N(2,Z):PRINT chr$(13)
  75. PRINT CLEAR$
  76. 2035 NEXT Z
  77. 2036 FOR Z=3 TO 9
  78. PRINT CUR$
  79. 2037 PRINT TAB(30);left$(repeat$,n(1,z))
  80. PRINT UP$;
  81. 2038 PRINT K$(1,Z);TAB(30);
  82. 2039 INPUT line K$(3,Z):PRINT chr$(13)
  83. if len(k$(3,z))>n(1,z) then k$(3,z)=left$(k$(3,z),n(1,z))
  84. 2040 I=(N(1,Z)-LEN(K$(3,Z))):K$(3,Z)=K$(3,Z)+left$(fill$,i)
  85. PRINT CLEAR$
  86. 2045 NEXT Z
  87. 2065 FOR Z=10 TO 19
  88. PRINT CUR$
  89. 2070 PRINT TAB(30);left$(repeat$,n(1,z))
  90. PRINT UP$;
  91. 2075 PRINT K$(1,Z);TAB(30);
  92. 2080 INPUT N(2,Z):PRINT chr$(13)
  93. PRINT CLEAR$
  94. 2085 NEXT Z
  95. 2090 N$=""
  96. 2095 FOR Z=3 TO 9:N$=N$+K$(3,Z):NEXT Z
  97. 2100 Z1=Z2
  98. 2105 PRINT clear$;
  99. 2110 PRINT "RECORD NUMBER";Z1;TAB(31);"FINISHED GOODS ENTRY"
  100. 2115 FOR Z=1 TO 2
  101. 2116 PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  102. 2118 NEXT Z
  103. 2120 FOR Z=3 TO 9
  104. 2122 PRINT K$(2,Z);TAB(30);K$(3,Z)
  105. 2124 NEXT Z
  106. 2126 Z=10:PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  107. 2128 FOR Z=11 TO 12
  108. 2130 PRINT K$(2,Z);TAB(30);:print using l$;n(2,z)
  109. 2132 NEXT Z
  110. 2134 FOR Z=13 TO 19
  111. 2136 PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  112. 2138 NEXT Z
  113. 2140 PRINT K$(2,20)
  114. 2163 PRINT"TO MAKE A CHANGE, TYPE THE APPROPRIATE #."
  115. 2164 INPUT Z
  116. 2165 IF Z>19 THEN 2216
  117. 2170 IF Z<1 THEN 2105
  118. 2175 IF Z>2 AND Z<10 THEN 2200
  119. CL=10:CC=50:GOSUB 50:PRINT CUR2$;
  120. 2180 PRINT left$(repeat$,n(1,z))
  121. CL=12:GOSUB 50:PRINT CUR2$;
  122. 2185 PRINT K$(1,Z)
  123. CL=10:CC=48:GOSUB 50:PRINT CUR2$;
  124. 2190 INPUT N(2,Z)
  125. 2195 GOTO 2225
  126. 2200 CL=10:CC=50:GOSUB 50:PRINT CUR2$; :PRINT left$(repeat$,n(1,z))
  127. CL=12:GOSUB 50:PRINT CUR2$;
  128. 2205 PRINT K$(1,Z)
  129. CL=10:CC=48:GOSUB 50:PRINT CUR2$;
  130. 2210 INPUT line K$(3,Z)
  131. if len(k$(3,z))>n(1,z) then k$(3,z)=left$(k$(3,z),n(1,z))
  132. 2215 I=(N(1,Z)-LEN(K$(3,Z))):K$(3,Z)=K$(3,Z)+left$(fill$,i)
  133. 2216 N$=""
  134. 2220 FOR Z=3 TO 9:N$=N$+K$(3,Z):NEXT Z
  135. 2225 CL=14:CC=50:GOSUB 50:PRINT CUR2$;
  136. INPUT "ANY MORE CHANGES";line temp$
  137. 2230 IF left$(temp$,1)="y" OR left$(temp$,1)="Y" THEN 2105
  138. 2235 PRINT CUR2$;
  139. 2240 INPUT "IS RECORD TO BE ENTERED";line temp$
  140. 2245 PRINT
  141. 2250 IF left$(temp$,1)="y" OR left$(temp$,1)="Y" THEN 2280
  142. 2255 IF left$(temp$,1)<>"n" AND left$(temp$,1)<>"N" THEN 2235
  143. 2260 PRINT clear$:PRINT
  144. 2270 PRINT "*** RECORD NOT ENTERED ***":PRINT:PRINT
  145. 2275 FOR Z=1 TO 200:NEXT Z:RETURN
  146. 2280 open z5$ recl 256 as 1
  147. print #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  148. close 1
  149. 2295 IF new$="N" THEN Z2=Z2+1:open z7$ as 1:print #1;z2,z3:close 1
  150. 2300 RETURN
  151. 3000 PRINT clear$:PRINT
  152. 3005 INPUT "RECORD NUMBER";Z1
  153. 3010 IF Z1>=Z2 THEN 3000
  154. 3012 IF Z1<1 THEN RETURN
  155. 3015 open z5$ recl 256 as 1
  156. read #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  157. 3022 Z9=1:FOR Z=3 TO 9:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):next z
  158. 3025 close 1
  159. 3105 GOSUB 11000
  160. 3170 PRINT"FOR A NEW RECORD, TYPE N - TYPE F IF FINISHED.":INPUT line temp$
  161. 3190 IF ucase$(temp$)="N" THEN 3000
  162. 3195 RETURN
  163. 4000 PRINT clear$:PRINT
  164. 4005 N$=""
  165. 4010 INPUT "RECORD NUMBER";Z1
  166. 4015 IF Z1<1 THEN PRINT "*** NO SUCH RECORD ***":GOTO 1620
  167. 4020 IF Z1>Z3 THEN PRINT "*** OUT OF RANGE ***":GOTO 1620
  168. 4025 IF Z1>=Z2 THEN PRINT "NO RECORD NUMBER";Z1:GOTO 1620
  169. 4030 open z5$ recl 256 as 1
  170. read #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  171. 4036 Z9=1:FOR Z=3 TO 9:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):NEXT Z
  172. 4040 close 1
  173. 4045 IF N(2,1)=0 THEN PRINT "*** DELETED RECORD ***":GOTO 1620
  174. 4075 GOTO 2105
  175. 5000 PRINT clear$:PRINT
  176. 5010 INPUT "RECORD NUMBER";Z1
  177. 5015 IF Z1<1 THEN PRINT "*** NO SUCH RECORD ***":GOTO 1620
  178. 5020 IF Z1>Z3 THEN PRINT "*** OUT OF RANGE ***":GOTO 1620
  179. 5025 IF Z1>=Z2 THEN PRINT "NO RECORD NUMBER";Z1:GOTO 1620
  180. 5030 open z5$ recl 256 as 1
  181. read #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  182. 5036 Z9=1:FOR Z=3 TO 9:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):NEXT Z
  183. 5040 close 1
  184. 5105 GOSUB 11000
  185. 5200 INPUT "IS RECORD TO BE DELETED (MUST BE YES TO DELETE)";line temp$
  186. 5205 IF left$(temp$,1)="n" OR left$(temp$,1)="N" THEN RETURN
  187. 5210 IF ucase$(temp$)<>"YES" THEN 5200
  188. 5215 N(2,1)=0
  189. 5220 open z5$ recl 256 as 1
  190. print #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  191. 5230 close 1
  192. 5235 RETURN
  193. 6000 PRINT clear$:PRINT
  194. 6005 PRINT "IF YOU HAVE ARRIVED HERE, AND HAVE A FINISHED GOODS FILE"
  195. 6010 PRINT "ALREADY ON A DISK, YOU SHOULD INSTALL THAT DISK THEN"
  196. 6015 PRINT "TYPE THE LETTER C FOLLOWED BY A RETURN TO CONTINUE."
  197. 6020 PRINT
  198. 6025 PRINT "IF YOU WISH TO CREATE A NEW FILE, TYPE THE LETTER N"
  199. 6030 PRINT "FOLLOWED BY RETURN.":PRINT
  200. 6035 INPUT temp$
  201. 6040 IF ucase$(temp$)="C" THEN initialize:GOTO 1500
  202. 6045 PRINT clear$:PRINT
  203. 6050 INPUT "NUMBER OF RECORDS DESIRED";z3
  204. 6055 PRINT
  205. 6060 n$="":for z=1 to 80:n$=n$+" ":next z:FOR Z=1 TO 20:N(2,Z)=0:NEXT Z
  206. 6065 create z5$ recl 256 as 1
  207. 6070 FOR Z1=1 TO z3+2
  208. print #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  209. 6085 NEXT Z1
  210. 6090 close 1
  211. 6095 PRINT clear$:PRINT
  212. 6100 PRINT "FINISHED GOODS FILE CREATED AND CLEARED.":PRINT
  213. 6105 PRINT z3;"RECORDS CREATED.":PRINT
  214. 6110 PRINT "TO CONTINUE, TYPE RETURN.":INPUT line temp$
  215. Z2=1
  216. create z7$ as 1:print #1;Z2,Z3:close 1
  217. 6115 GOTO 1500
  218. 7000 z2=z3:n$="":for z=1 to 80:n$=n$+" ":next z:FOR Z=1 TO 20:N(2,Z)=0:NEXT Z
  219. 7006 INPUT "ARE YOU SURE !!! (YES OR NO)";line temp$
  220. 7007 IF ucase$(temp$)<>"YES" THEN RETURN
  221. open z5$ recl 256 as 1
  222. 7010 FOR Z1=1 TO z3+2
  223. print #1,z1;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  224. 7025 NEXT Z1
  225. 7030 close 1
  226. 7035 PRINT clear$:PRINT
  227. 7040 PRINT "FINISHED GOODS FILE CLEARED!":PRINT
  228. 7045 PRINT "TO CONTINUE, TYPE RETURN."
  229. 7050 INPUT line temp$
  230. Z2=1
  231. open z7$ as 1:print #1;Z2,Z3:close 1
  232. 7060 RETURN
  233. 8000 chain "fgsort"
  234. 9000 lprinter
  235. 9005 PRINT clear$:PRINT
  236. 9010 open z5$ recl 256 as 1
  237. 9015 FOR I=1 TO Z2-1
  238. read #1,i;n(2,1),n(2,2),n$,n(2,10),n(2,11),n(2,12), n(2,13),n(2,14),n(2,15),n(2,16),n(2,17),n(2,18),n(2,19)
  239. 9035 Z9=1:FOR Z=3 TO 9:K$(3,Z)=MID$(N$,Z9,N(1,Z)):Z9=Z9+N(1,Z):NEXT Z
  240. 9110 print "RECORD NUMBER";i;TAB(31);"FINISHED GOODS ENTRY"
  241. 9115 FOR Z=1 TO 2
  242. 9116 print K$(2,Z);TAB(30);:print using u$;n(2,z)
  243. 9118 NEXT Z
  244. 9120 FOR Z=3 TO 9
  245. 9122 print K$(2,Z);TAB(30);K$(3,Z)
  246. 9124 NEXT Z
  247. 9126 Z=10:print K$(2,Z);TAB(30);:print using u$;n(2,z)
  248. 9128 FOR Z=11 TO 12
  249. 9130 print K$(2,Z);TAB(30);:print using l$;n(2,z)
  250. 9132 NEXT Z
  251. 9134 FOR Z=13 TO 19
  252. 9136 print K$(2,Z);TAB(30);:print using u$;n(2,z)
  253. 9138 NEXT Z
  254. 9145 print chr$(12)
  255. 9150 NEXT I
  256. print chr$(12):for z=1 to 100:next z:print chr$(12)
  257. 9155 console
  258. close 1
  259. 9900 RETURN
  260. 10000 CHAIN "master4"
  261. 11000 PRINT clear$:PRINT
  262. 11110 PRINT "RECORD NUMBER";Z1;TAB(31);"FINISHED GOODS ENTRY"
  263. 11115 FOR Z=1 TO 2
  264. 11116 PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  265. 11118 NEXT Z
  266. 11120 FOR Z=3 TO 9
  267. 11122 PRINT K$(2,Z);TAB(30);K$(3,Z)
  268. 11124 NEXT Z
  269. 11126 Z=10:PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  270. 11128 FOR Z=11 TO 12
  271. 11130 PRINT K$(2,Z);TAB(30);:print using l$;n(2,z)
  272. 11132 NEXT Z
  273. 11134 FOR Z=13 TO 19
  274. 11136 PRINT K$(2,Z);TAB(30);:print using u$;n(2,z)
  275. 11138 NEXT Z
  276. 11140 RETURN
  277. 15000 print clear$:print:print "CHECKING FILE LENGTH"
  278. PRINT:PRINT "*** PLEASE WAIT ***"
  279. open z5$ recl 256 as 1
  280. z3=(size(z5$)*block.size)/256
  281. for z2=1 to z3
  282. read #1,z2;n(2,1),n(2,2)
  283. if n(2,2)=0 then 15300
  284. next z2
  285. 15300 z3=int(z3)-2
  286. close 1
  287. create z7$ as 1
  288. print #1;z2,z3
  289. close 1
  290. GOTO 1500