Keyboard Buffer question (AREV Specific)
At 08 SEP 1998 11:37:39AM Matt Sorrell wrote:
I have a question about the keyboard buffer. We have an End of Day closeout procedure that is called from a batch file. There is a status window that displays which process is currently running, what has been completed, and what is left to be run. Each section of code runs as a pre-prompt process, the window is then updated, and focuse moves to the next WC_MV.
Here is the problem I'm having. Let's say that while this process is running, the end user presses . That keystroke is held in the keyboard buffer until my application exits, and then it is passed to the next program that is called from the batch file, which happens to be scandisk.
This causes scandisk to pause, which means scandisk does not complete, and the nightly backup does not run. I've tried testing @DATA and clearing it, but the CR is not in @DATA. If I test @PROG.CHAR, then I can tell that CR has been pressed, but I cannot prevent it from being passed back to the operating system.
One last note, the OFF command is performed within code, but I have tried moving it out of code and into the VOC command that the environment runs. No joy.
Sorry this is so long, but if anyone has any ideas I would greatly appreciate this.
Matt
At 08 SEP 1998 01:41PM Victor Engel wrote:
To clear the buffer prior to the next process do something like this:
LOOP
INPUT CHARACTER,-1
UNTIL NOT(LEN(CHARACTER))
REPEAT