A terminal emulator is software that lets people communicate with a centralized computer (e.g. a mainframe). For example, green screen (terminal emulator software) might be used by a banker to look up your credit score or a doctor to record notes from your last consultation.
When it comes to automation, the above terms are often used interchangeably. They all mean the same thing though, so just remember that green screen automation = (legacy) terminal automation = mainframe automation.
First, understand that the robot interacts with the mainframe system using HLLAPI-compliant emulators. There are numerous HLLAPI-compliant emulators on the market, such as Rumba, Attachmate, and BlueZone. For more information, see Text application integration.
You also need to understand how to control how the emulator starts and stops itself. To handle the emulator in the solution, use two adapters. Use a Windows adapter to start or stop the emulator and to know when the emulator is available to be used. Once you start the emulator and it is available, launch the Text adapter. The Text adapter connects to the emulator using the HLLAPI shortname.
One of the issues many developers have is controlling the stopping of the two adapters. First, you must stop the Text adapter, allowing it to disconnect from the emulator before stopping the windows adapter and shutting down the actual emulator. If done incorrectly, the Text adapter can get into a bad state and not restart or connect to the emulator correctly. Controlling the stopping is easy if done through the automation; however, the difficulty comes when a user clicks the X on the emulator window. To handle this case, you must catch the emulator's stopping, stop the Text adapter, and then allow the emulator to close. The following illustration is an example of this type of automation:
Set the event link from the isStopping variable to the text adapter isRunning and check Asynchronous. This allows the IsStopping variable to be changed to False before the adapter property is checked.
795a8134c1