Possible to connect to 2 terminal sessions at the same time and switch back and forth?

Is it possible to use 2 Terminal Session using 2 different IBM i-navigator .ws profiles and connect/interact with both terminals at the same time? We would be connecting to 2 separate legacy systems.

Our use case is that we have a single queue for multiple systems, two of which are AS/400 systems accessed via terminal session. This queue contains the info specifying which system to use. We don’t want the robot to waste time logging on/off for every single transaction. Ideally it would initialize all applications and go to the correct entry screen for all systems, then process queue items, then exit out of all systems. Is this feasible?

Anyone know?

You could save connections into 2 variables so you don’t need to login/logout and then just reuse those in Terminal Sessions down the workflow as needed (making sure you provide “Existing Connection” and uncheck “Close Connection” all the time except for the last finishing step)
Saving a connection:
Reusing a connection:
In some versions the variable must appeared as used (i.e. make sure to add the other terminal session that reuses the variable in the workflow) in order to be sure the terminal window remains open. I think it shouldn’t still be the case in 3.0.0 version of the Terminal Activities, but I cannot confirm right now, so leaving it here as a “just in case” tip.

You mentioned you connect with .ws profiles so you should be good.
But if you end up using EHLL for any reason (I prefer EHLL myself), you would additionally have to make sure one terminal has Short Session set to “A” and the other one to “B” and distinguish them as such when connecting to each.

Only went with something like this a while back, not sure if with IBM PComm though.

1 Like
  1. The best way would be to get a list of all the running processes using “Get Processes” activity.
  2. There’ll be a different process for each Terminal session which will be captured in the process name.
  3. Try to retrieve the session name using string manipulations and edit a previous connection string with this session name. You can view your existing connection string and use that in a variable to make the changes.
  4. This way you can use two different terminal sessions and will be able to switch seamlessly between these sessions.

Thank you! I was having some troubles keeping the connection when having more than one open, but it turns out it was related to my computer for unknown reasons. Switching to a different computer worked as expected like you mentioned.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.