Rocket® Reflection Desktop (formerly a product of Micro Focus or formerly a product of Open Text) documentation that was created prior to Rocket Software's acquisition of certain products from OpenText may contain outdated references to "Micro Focus” or “OpenText”, which are trademarks of OpenText. Rocket Software is not affiliated with Micro Focus or OpenText and has rebranded these products as Rocket® products.
Work With Multiple Sessions
In This Topic
You can work with more than one session at a time in Reflection. This sample shows how to get text from one session and put it into another session.
To copy text from one session to another
- In Visual Studio, create a new Console Application project and add references for
the following Reflection assemblies. (Depending on your version of Visual Studio,
these can be found either on the .NET tab or under Assemblies | Extensions.)
Attachmate.Reflection
Attachmate.Reflection.Framework
Attachmate.Reflection.Emulation.IbmHosts
Attachmate.Reflection.Emulation.OpenSystems
- Replace all the code in the Program.cs file with the following code for the terminal you are using. This code sets up a property for the text that is copied from one session to another.
It also creates two sessions and creates event handlers (and a method for Open Systems)
to navigate through each session.
- Add the code to navigate through the first session and get some text.
- Add the code to navigate through the second session and enter the text.
To test this project
- If you are using an Open Systems terminal, open Reflection and create a new VT session. Then enter "demo:UNIX" in the IP/Address box and save the session as demoSession.rdox.
- In Visual Studio, press F5 to run the project.
- Verify that the two sessions open and that the text is retrieved from one session and put into the other.