Export stock table bug

Make comments, ask questions, or just complain about the software on this site. Or comment on any educational software.
Please note that by clicking on links that may appear in these posts that you may be leaving the Dale Harris Educational Software website and that the content of those sites is the sole resposibility of the authors of those sites.

Moderators:daleadmin, Dale Harris, Alan, Andrew

User avatar
daleadmin
Forum Owner
Posts:1279
Joined:Tue Dec 30, 2003 9:47 pm
Export stock table bug

Post by daleadmin » Tue Jul 11, 2017 4:04 pm

6 years later, a bug fix.

Well it has been a while (a very long while) since a bug has been discovered in the POS program. However Chris N. managed the trick and emailed me about a problem. It seems that when he was exporting a portion of the stock table to a data file so that it could be loaded into a spread sheet program that the last part of the data was not getting into the file. I tried it and it worked just fine for me. This is one of my favorite types of problems, one that I cannot get to not work, frustrating.

Eventually we found out that he was halting the process just when the POS program stated “FILE SAVED” while I was going past that point.
When a program sends data to a file it first sends it to a buffer. When the buffer is filled only then is the data actually written to the disk file. If the data in the buffer does not fill the buffer then the data is stuck there until more data fills it or the file is closed, then any remaining data in the buffer is written to the disk file. Obviously.

So I tried to make a file and then stop when the screen displayed “FILE SAVED.” Then I loaded the saved file into MS Word. Sure enough the end data was missing but more important MS Word told me that the file was still being used by another program.
Then when I returned to the POS program and pressed a key to clear the “FILE SAVED” message and then returned to MS Word and reloaded the file, all the missing data mystically appeared. How cool was that?

Then all I had to do was find the code in the program that displayed “FILE SAVED”, determine that file #4 was the open file that was used to write the data to the disk, and then put the code “CLOSE 4” in front of that.

Then I found another problem. If you were printing the data to the printer and chose enough of the fields so that the length of each line would be longer than what you had set the POS program to print per line, the program would tell you that it was too long (a good thing.) Then when you cleared that message the program would die. This was not optimal. So I also fixed that.

For you to fix this problem you need to download this file http://dhpos.com/stocks.exe into the same folder as the rest of the POS program files. MAKE A BACKUP OF YOUR CURRENT STOCKS.EXE FILE FIRST!!! If you are running this program over a network you must load this file into each LOCAL folder on each computer you are using as a cash register and the GLOBAL folder on the server.

To make sure that you are running the new version run the POSCONFG.EXE program and go to the stock table feature and display the stock table, look at the top left of the first screen. The label will display “STOCK NUMBER.” Note the period which will not appear in the old version.

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests