wales@valeria.cs.ucla.edu (Rich Wales) (10/19/90)
Several people have described a situation in which dBASE generates out- put faster than their laser printer can print it -- resulting in errors and lost data. Since some other programs don't seem to suffer in this way, they have blamed the situation on dBASE. The underlying problem here, as I understand it, is that the DOS I/O interface, by default, returns an error if output to a parallel or ser- ial port times out. You can get around this problem in one of two ways: (1) Run the command "MODE LPT1,,P" (with two commas as shown) in your AUTOEXEC.BAT. This command installs a TSR which intercepts the error in question, checks the hardware state on the port in question to see if the problem is a timeout condition, and keeps retrying indefinitely if such is the case so that the program will never see the timeout condition. (2) Incorporate similar logic into the program itself. That is, either check the hardware state to see if a "write" error is due to a time- out, or else bypass DOS entirely and perform your output by talking directly to the I/O ports of the printer's interface. While this problem could arguably be seen as a flaw in dBASE (which is probably just opening "PRN" and writing to it as if it were a regular disk file), I believe it could just as arguably be seen as a flaw in DOS (which should handle timeouts in a more intelligent fashion so that user software doesn't have to include extra workaround kludges). -- Rich Wales <wales@CS.UCLA.EDU> // UCLA Computer Science Department 3531 Boelter Hall // Los Angeles, CA 90024-1596 // +1 (213) 825-5683 "I do not know. I have never done this before."