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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Host Priority

Status
Not open for further replies.

Atreta

Programmer
Jan 4, 2011
4
BR
Hi,
I posted this on another forum, but i think it was the wrong place and i can't find a way to delete it. I'm writing an application with MyExtra 6.5 and in my company we have 3 different hosts with redundancy and i need a way to check if the first host is down and if it is, the app should connect to the second one and so on. I mean if we can change de host info inside the emulator and make it reconnect, but from inside a code. Is there a way i can do it? any help will be greatly appreciated.
 



Hi,

What code have you tried and where are you having problems?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
thanks for your reply.
My application for now only does simple copy and paste information inside the terminal.
no problem so far, i just need the information if it's possible to set host priority inside a vba code. I can post my code here, but almost everything is in portuguese,except the VB or VBA code.We have 3 different edp files with 3 different hosts. What i need is a way to check if the host is unresponsive and if it is the app should try the second host and so on, instead of we having to close one and open the other one. can you point me to a function or any direction i can read about it?
sorry for the long post.
thanks a lot
 


Check out Extra Help on Session.

I found this...
Choose the Sessions Pages button to access information on all active LU 6.2 sessions. The information is divided between two pages: the Session page and the Session Statistics page.
The Sessions page lists all the active LU 6.2 sessions.
The Session Statistics page displays the statistics for the session selected on the Sessions page.

Copyright 1996 - 1999, Attachmate Corporation. All rights reserved.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
thanks again.
but your answer, if i'm not mistaken, points how to change inside the emulator. if i'm wrong you can tell so :).
i'll post some of my code on pastebin and place the link here
basically it captures data from terminal screen and places inside the excel sheet and vice versa, so we can make things more intuitively. here is the code, like i said pretty much is in portuguese:

I need a way to do something like this, i'm gonna improvise so you can understand:
if(isHostUp(192.169.1.1))
{
do something
}
else (isHostUp(192.168.1.2))
{
do something
}
what i'm trying to find is a way to verify if the host is up, if it is it will use this host to execute the code, else it will use the second host. It would be nice if it's possible to close the connection with the first unresponsive and open a new one with the second, third and so on if needed, always having just 1 session and 1 connection at a time.
really appreciate all your help and patience.
thank you.
 



Well could you not cycle in a loop, to open a sesson on any MF in your list and check the results of the connection?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
we decide to use some sort of loop, opening the executable file and then verify if the session connection is ok and execute it, if not we'll close the application and open another one.
when we finish the code i can post here for everyone to see.
thanks a lot for your help and patience.


Atreta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top