-
Reflections Macro
I am building a customized macro in reflection IBM 3270. I don't know how to handle the timed event.
This is part of the code
<--------
.TransmitANSI tmp_str
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcKbdEnabled, "0", "0", 1, 1
.WaitForEvent rcEnterPos, "05", "0", 24, 66 ' check for timeout
.WaitForDisplayString "==>", "30", 24, 62
After the rcIBMEnterKey is sent ,the screen displays the data requested.
If there is no data validation error the cursor goes to 24,62 , the screen is closed and back to the query screen. If there is a data validation error the screen displays the data requested and the cursor navigates to the problem field (not 24,62) and sits there waiting for user intervention on the red colored line of code but I dont have the keyboard enabled so I can not press any key so the routine continues. I want to be able to handle the event in such a way that when the .waitforevent event times out the cursor goes from the problem field is to 24,62 so the routines continues by sending an enter key and back to the search screen.
I tried using 'on error' but I was able to trap it once, the second time it just errs out from the routine and terminates.
Any help would be greatly appreciated?
Thanks