Problem here, I believe, is that you check using INPUT OPT.OUT,-1 and do action on it, but you never actually drain anything out. Once the test is successful, then you should actually perform an INPUT to drain the buffer of anything, i.e.

INPUT OPT.OUT,-1
if OPT.OUT = "S" then
INPUT OPT.OUT,1; * drain
EXIT
end
OPT.OUT=0; ......

Hope this helps.

At 10:54 AM 4/28/2004, you wrote:
We have a program looping through all data files searching
for something
- sometimes it gets to a file containing several million
records and
we'd like to be able to tell it to skip that file and
continue with the
next file. We've tried the following approaches with said
results:
   (1) OPT.OUT = KEYIN() ; if OPT.OUT = 1 then EXIT
       OPT.OUT = 0
       the program sits waiting for input in every
iteration, ie every
record

   (2) INPUT OPT.OUT,-1 ; if OPT.OUT = 'S' then EXIT
       OPT.OUT = 0
       CLEARDATA
       CLEARINPUT
       the program works perfectly until an 'S' is entered
then skips
every file after that...

       HOWEVER, if I press Ctrl-Break, enter DEBUG, enter
C(ontinue),
the program continues as normal until another 'S' is
       entered..

Obviously the machine still has something in the input
buffer, despite
the CLEARDATA, something that gets whacked when debug hits
the scene...

Any ideas?


-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users

-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to