Mainframe Automation session is closing

While working in mainframe

In the process state I’m using the Terminal session & need to process all the queue items. After completing the all the items, When the bot comes to no transaction data means i need to perform some actions on screen & need to do soft logout the mainframe in End state.

So here my doubt is,
How we can make the mainframe connection active for processing the next queue items & when it reaches end state means how to make the connection active.

Bcoz mainframe connection is getting closed after it came out of Terminal session in process state.

How to proceed on this ??

Make sure the “close connection” box is not checked for the Terminal Session activity. Pass the connection out of the first Terminal Session activity as a variable, and use that as the input for your other Terminal Session activities.

1 Like


It is the main terminal activity and represents a connection to a terminal server. It acts as a container for all other terminal activities. By default, after activity execution, the terminal connection is closed.

So make sure u have these properties chosen in a right way

  1. Disable Closeconnection
  2. Have something retrieved from OutputConnection as a variable so that u can use that as a input for next terminal activity in ur workflow


  • ConnectionString: contains the connection parameters; automatically generated from the connection dialog
  • OutputConnection: optional, one may specify an output variable (of type TerminalConnection) in order to be used later in other terminal sessions
  • CloseConnection: used with ExistingConnection property; specifies if the connection is closed after executing the Terminal Session activity
  • ExistingConnection: a variable of type TerminalConnection that was previously initialized

When using many terminal sessions, it is recommended to reuse the terminal connection by saving it into a variable and use it in the next sessions. This is to avoid connecting and disconnecting multiple times, as this process is more time consuming.

Cheers @Praveen_Vs

1 Like

Thanks @postwick @Palaniyappan

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