Inventory Program for 2068

Authors

Publication

Pub Details

Date

Pages

See all articles from SUM v4 n7

I tried to make this an user-friendly program. If the program is interrupted, it should be restarted with GOTO 50.

At some places in the program, if there Is an error and the program does not return to the menu, data can be lost to the user. It is still there but the counter “A” will be set at the wrong number. It is recommended that this option be disabled by adding a REM statement after 55 while working on the program, but remember to remove it once all your changes have been made. To enter your own name and title, change line 190 and 215.

The main menu has eight options, which may be selected by pressing the appropriate number.

Option 1 starts a new inventory and will erase all previous files. However, If the selection is made by mistake, the program will stop with a flashing warning and may only be continued by pressing “C”. Any other key will return to the main menu. The arrays are dimensioned here and place limits on data to be entered. 500 items may be entered. Their names can be up to 16 characters in length. all lengths include spaces. The price is limited to 6 places. Thats $999.99 for each item. Item count is limited to 99999 and minimum count is limited to 9999. Commas should not be used since this will shorten the allowable space.

Option 2 is used to add items to the file. Prompts are used at each step. When the date is asked for, enter two digits for the month, day, and year. January 8, 1986 would be entered 010886. It will appear in the program as 01/08/86.

Option 3 allows changing any item status. Such as item name, quantity, price, minimum stock level, vendor, or date ordered. If a 0 is entered instead of the date, that item will not show up when minimum stock level is asked for. A good way to not reorder an obsolete item. Selection of an item is done by item number and not by item name.

Option 4 will search for an item by name. the program prints the file numbers as it runs through looking for a match. This makes the program a little slower, but is well worth the time, since it lets you see that it is working and where its at.

Option 5 allows looking at each item in inventory. This option may be terminated at any time and returns to the main menu.

Option 6 will delete the item number you selected and move the other files down one position to fill the void left by the deleted file. Here again you can watch the files move. The program does not have to run to 500, the limit of the file space.

Option 7 will check stock to see if any item is at or below minimum stock level. Any item found is printed on the screen showing the item number, name, stock level and minimum stock level.

Option 8 allows the user to save the program or stop without returning to line 50.

A final word. When changing the program, disable the ON ERR at line 50 until you are sure the program is working correctly, otherwise the program could lock up requiring you to turn off the computer and start over.

For a master copy, enter CLEAR before saving to tape. Don’t CLEAR when data is to be saved. When the master copy is loaded, you must use option 1 to set the arrays before any data can be entered. Don’t forget, option 1 will wipe out all data in a loaded program.

Enter the program and RUN for the first time only. Running after data entry will erase all data. Here is a breakdown of program operation:

Line 10, X$ contains stars for accentuating the program and is printed when called for.

Line 50 sets key “click” and puts computer in CAPS lock.

Line 55 stops loss of data in case a wrong entry is made.

Lines 60 to 240 comprises the initial menu.

Line 250 takes the value of A$ and multiplies this number by 1000, sending the program to the selected menu item.

Lines 270 to 320 is the print subroutine to print files selected.

Line 1000 clears the screen and 1001 flashes the warning that all prior data will be lost if you continue. Any key except “C” will return you to the menu.

Lines 1010 to 1060 dimension string arrays to hold 500 items and related information.

Lines 1070 to 1340 allow you to load che program with your inventory items.

Lines 1110 and 1165 allow escaping from the loading routine back to the main menu.

Lines 1350 to 1380 notify you when the files are full and return you to the menu.

Line 2000 directs the program back to the inventory loading routine to add additional items. Line 3000 sets a flag since the following routine is used in two parts of the program and the value of “Z” determines where the program is directed.

Line 3000 sets Z to 1 and any return to line 50 resets Z to 0 at line 75.

Line 3010 to 3260 allow changing the data concerning the item selected.

Line 3265 returns to the main menu.

Lines 3270 to 3350 are used in other sections of the program.

Lines 4000 to 4200 search for an item by name.

Line 4100 sets S$ to A (number of items in inventory) with a length determined by the length of the named item.

Line 4140 sends the program to line 4210 for print out when the matching name is found. If no match found, the program returns to line 4120 to continue the search. If no match is found by the time N runs out, line 4160 informs you that the item was not found and asks to try another or return to the menu.

Lines 5000 to 5210 cycle through the inventory an item at a time.

Lines 6000 to 6240 delete an item from the file and drop each item back one to fill the void.

Lines 7000 to 7170 runs through the inventory to pick out items that are at or below minimum stock level. 7180 returns to the menu.

Line 8000 disables the command to go to 50 on an error. This is selected any time a save routine is selected and is the only way to stop the program.

Lines 8010 to 8060 contain the save routine. Enjoy!

Products

 

Media

 

Image Gallery

Source Code

Scroll to Top