When your macro interacts with a mainframe program, you'll need to handle the asynchronous behavior that occurs between your macro and the host program.
Your macro runs independently of the host program. Two programs are processsing commands (the host program and your macro) and these programs are not synchronized. Because of this asyncronous behaviour, you'll need to pause execution of your macro after you send a command to the host. After the host responds and InfoConnect processes the data to render a new screen, you can resume execution. If your macro tries to interact with the screen before it is ready, it will get unexpected results or errors.
To handle this asychronous behaviour and make sure your macro waits until the terminal screens or Web pages are ready, use the following InfoConnect events and methods.