May be someone experiences the same problem and may find this solution useful. Usually, when one is using the mainframe-application-model with OpenText HostExplorer (formerly Hummingbird) (COM API) it is only possible to connect to one session at a time. Here is my workaround for version 15:
1. Create 2 shared objects using 2 separate hep-file for configuration (A+B). Add a launch and terminate action in those.
2. Open your HostExplorer and configure it as required.
2.1 Go to Options --> Connection --> Other and type "A.ebs"/"B.ebs" in the Auto start Macro field
2.2 Save the profile
2.3 Go to your (the bots) profile: C:\Users\%username%\AppData\Roaming\Hummingbird\Connectivity\15.00\Accessories\EB
2.4 Create a text file there, name it A or B.ebs and place the code below in there
3. You can now start the sessions via the shared objects and attach to the sessions via "Attach Mainframe" --> Session Identifier="A" or "B"
Hope this is helpful to anyone
Hope this helps.
Macro A.ebs / B.ebs
Sub Main
Dim HostExplorer as Object
Dim MyHost as Object
Dim Rc as Integer
On Error goto GenericErrorHandler
Set HostExplorer = CreateObject("HostExplorer") ' Initialize HostExplorer Object
Set MyHost = HostExplorer.CurrentHost
If MyHost is Nothing Then Goto NoSession
MyHost.ShortName = "A" ' B for B of course
' if you require to use a LUName, then add MyHost.Cfg3270.LUName=yourLU
Exit Sub
'-------------------- Runtime Error Handlers --------------------
GenericErrorHandler:
Msgbox "Error " & Err & " : """ & Error(Err) & """ has occurred on line " & Erl-1 & "." & Chr(10) & "Unable to continue macro execution.", 16, "HostExplorer Basic Macro Error"
Exit Sub
NoSession:
Msgbox "Profile is not running." & Chr(10) & "Unable to execute macro.", 16, "HostExplorer Macro Error"
Exit Sub
OnKeyboardError:
Msgbox "Unable to type string on host screen." & Chr(10) & "Unable to continue macro execution.", 16, "HostExplorer Basic Macro Error"
Exit Sub
End Sub
------------------------------
Martin Reuter
------------------------------