Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection question

Status
Not open for further replies.

vzachin

Technical User
Feb 10, 2006
305
US
hi,

is there a way of getting the Host Alias / IP Address for a session using eb?


thanks
zach
 
is this at all possible? anyone?


zach
 
i'm not familiar with object.HostName
how would i code that?

zach
 
it might be something like this depending on your system object:
Code:
sess0.hostname
you can check it in a message box:
Code:
msgbox sess0.hostname
it is in the help topics of the macro editor under HostName property
 
hi,

this is my code but it's giving me a blank. i'm accessing an IBM mainframe and i don't think it's possible... :-(

Code:
Sub main()
    Dim Sessions As Object
    Dim System As Object
    Set System = CreateObject("EXTRA.System")   ' Gets the system object
    If (System Is Nothing) Then
        MsgBox "Could not create the EXTRA System object.  Stopping macro playback."
        Stop
    End If
    Set Sessions = System.Sessions
    If (Sessions Is Nothing) Then
        MsgBox "Could not create the Sessions collection object.  Stopping macro playback."
        Stop
    End If
    g_HostSettleTime = 50     ' milliseconds
    OldSystemTimeout& = System.TimeoutValue
    If (g_HostSettleTime > OldSystemTimeout) Then
        System.TimeoutValue = g_HostSettleTime
    End If
    Dim Sess0 As Object
    Set Sess0 = System.ActiveSession
    If (Sess0 Is Nothing) Then
        MsgBox "Could not create the Session object.  Stopping macro playback."
        Stop
    End If
    If Not Sess0.Visible Then Sess0.Visible = True
    Sess0.Screen.WaitHostQuiet (g_HostSettleTime)
    

    myhost = Sess0.hostname
    
    MsgBox Sess0.hostname
End Sub

zach
 
You are right, Sess0.HostName doesn't work when using an IBM Mainframe. I couldn't find anything that would work with an IBM Mainframe, sorry... maybe someone else can come up with the solution
 
I got it working for me and my host is an IBM Mainframe...
Code:
Sub Main
  Dim Sys As Object,Sess As Object
  Set Sys = CreateObject("EXTRA.System")
  Set Sess = Sys.ActiveSession
  
	Dim MyHost
 
	MyHost=Sess.HostName
	MsgBox MyHost
End Sub
 
My host is an IBM Mainframe and it works for me...
Code:
Sub Main
  Dim Sys As Object,Sess As Object
  Set Sys = CreateObject("EXTRA.System")
  Set Sess = Sys.ActiveSession
  
	Dim MyHost
 
	MyHost=Sess.HostName
	MsgBox MyHost
End Sub
 
hi brumo,

what version of attachmate do you have?
i still can't get this to work?
i'm using enterprise2000


thanks
zach
 
hi brumo,

you're absolutely right! it works on x-treme 8.0

thanks
zach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top