I'm scripting 5250 sessions in JD Edwards ERP and I'm running into problems with its timing on redirections between different screen states and programs. So far I've been able to conditionally deal with any problems. e.g. If a blank screen shows up intermittently between two programs then I'll check for that possibility after enough failures are documented.
In the 5250 JDE interface some function keys generate a box over the rest of the screen similar to a dialog window. On one particular screen one of these optional windows is opened automatically when a user enters the primary screen that envelopes it. It appears that the user enters the program/screen (tightly coupled code) before the program loops back on itself to a state where the dialog window is displayed.
The 5250 Bridge sometimes catches a snapshot of the program at the point that the user has entered it but it has not yet looped back on itself. I can move the process along by "pressing" a key. However, I'm in a state that is only made unique by the fact that it may or may not happen -- something that by its nature I can't readily identify -- so I basically have to find a key that doesn't mean anything in any of the states involved or I may trigger yet another screen. This is something that I am still working through and that I'll likely encounter in other programs.
Has anyone else run into something similar? How have you dealt with it? i.e. Have you been able to effectively add a delay into your code to allow the 5250 screens to catch up? etc.

