EHLLAPI BEST PRACTICE TERMINAL

I am automating terminal using terminal ehllapi activities. I am connecting to existing session and using connection string.
What is the best way to handle terminal connection.
Is it a good way to get the output connection and pass it everyplace in my workflow
Or
User terminal session activity and connect using connection string and close it. When ever I need don’t have to worry about my connection.

Is there any best practice in terms of ehllapi?

@Rocki_Jan

At the first time connecting to MainFrames in your process use Termination Session activity to connect to MainFrames and then create one connection string variable to this and pass it to other Terminal Session activities where ever you used in your workflows.

Thanks @lakshman, so you are saying its better to pass connection string then creating treminalConnection variable that we get from terminal session activity?

@Rocki_Jan

Yes exactly.

Thanks for your help… Just wondering when and where do we use output terminlConnection? in what scenarios?

1 Like

@Rocki_Jan

I guess you used Terminal Session activity in different workflows right. Pass connection string at first time opening MainFrames in your process and for this create output connection argument and pass it to other workflow when you are trying to connect to MainFrames again instead of again passing connection string.

Hi @Rocki_Jan

Ideally you should do all the mainframe interactions inside a single terminal session activity. However if you want to use it at multiple places in you solution then you can either share the session which is created in first terminal session activity (it will be stored in outputcinnection variable) with other terminal session activities. Another approach is suggested by @lakshman.

1 Like

Yes… There are 2 ways to achieve it…

  1. Use connection string and everytime connect to the existing session. No output variable. Everytime I want I will use connection string to connect to existing session.
  2. get terminalConnection output from terminalSession activity. Use it across the workflows.

Now, which is recommended and why?

We have used both the approaches in one of our recent projects however have not noticed any benefits of one approach over the other.

My suggestion would be to share session if you are using terminal session activity multiple times in your solution otherwise go with connection string approach.