You can connect to running sessions. In this sample, the code gets a control object from an existing session (identified by its file path) and writes some data from that session to the Console.
Open the InfoConnect workspace and create a demo session as follows:
If you are using IBM, create an IBM3270 session with a host name of "demo:ibm3270.sim" and save the session as demoSession.rd3x in the default folder (...\myDocuments\Micro Focus\InfoConnect.)
If you are using Open Systems, create a VT session with a host name of "demo:UNIX" and save the session as demoSession.rdox in the default folder.
Press F5 to run the project and verify that text from the screen is written to the Console.