Modernize Legacy Systems with HostSurfer and z/Scope Anywhere

If you are following our blog you probably know that recently we’ve launched HostSurfer, our new legacy modernization framework integrated with z/Scope Anywhere.
What you probably don’t know yet, is that HostSurfer works not only with Mainframe and Midrange applications but also with VT, UNIX, and SHH screen-based applications.
In this article, we will explain how to use HostSurfer to recognize and process the VT screens.Modernize VT apps

modernize VT apps

Unlike the 3270 and 5250 screens, the data of the VT screen and other similar systems can be presented in parts that complete the info you see on the terminal screen. The screen content arrives from the VT host in several parts that can even replace the previously shown content. In this kind of connection, the screen information isn’t arranged in fields as in the TN3270/TN5250 connections.
In order to recognize the screen of VT or similar connections, we’ve added specific methods that will help identify and handle each part as if it were a new screen.
Below are the methods defined:
waitFor
waitForLoop
waitForBreak

WaitFor Method

This method is similar to ‘wait’ but waits until a certain condition takes place (matching rules) or times out. If it fails it will invoke ‘failureCallback’.
There are two ways to call this method:
waitFor(matchingRules, matchingCallback, failureCallback, timeout)
waitFor(matchingObj, failureCallback, timeout)
…where matchinObj is a JSON with the matching rules and its callback function.
This method allows to establish an individual until any rule matches, it will invoke ‘matchingCallbak’ afterwards.
If above doesn’t occur (because of timeout or you get an unexpected unlock) it will call ‘failureCallback’.
Using waitFor individually is useful to establish navigations and “waits” until some condition is fulfilled so you can take an action or even do another WaitFor afterwards. However, ‘waitForLoop’ might fit better.

waitForLoop Method

Just as waitFor, it will wait until a certain rule is matched, but waitForLoop will keep attending the incoming screens (or the screen parts). It will stop only when you invoke ‘waitForBreak’.

waitForBreak Method

Stops waitForLoop execution.
Example:

var waitForRules =
        [
            {   match: [{ text: "N o t i c e", col: 31 }],
                function() {
                    log("Notice");
                    log("
" + hs.getText()) + "

“);
}
},
{ match: [{ text: “Username:”, col: 1 }],
function() {
hs.sendKeys(myvalues.username);
hs.send.enter();
}
},
{ match: “Password:”,
function() {
hs.sendKeys(myvalues.password);
hs.send.enter();
}
},
{ match: [{ “text”: “logged out”, “col”: 16 }],
function() {
log(“‘logged out’ found. The waitForLoop is stopped.”);
hs.waitForBreak();
}
}
];
hs = new zScope.HostSurfer();
hs.on(“ready”, function() {
hs.waitForLoop(waitForRules, function() { alert(‘Oops!’) });
});

Using these 3 methods you have what you need to start modernizing any VT Legacy application.
Have any questions? Need help applying HostSurfer to your project? We would be happy to offer you our assistance (no cost involved).
Contact us at [email protected] or leave a message below.
 

z/Scope Anywhere, Web Terminal Emulator

z/Scope Anywhere offers a web-based client. Access

  • 3270
  • 5250
  • and SSH & VT hosts

…using your favorite browser!

Explore our Windows & Web host access solutions, enjoy our free 30-day trial, or book a quick call with our specialists HERE. No commitment!

Notes for current z/Scope Users

We find that many of our old customers are now adopting Windows 10 or Windows 11.
z/Scope v6.6 (desktop) and z/Scope Anywhere v8.5 (web) are fully compatible with Windows 10 and newer versions.

Do you run an older z/Scope version? Any z/Scope user covered by our Maintenance Service may update their current version at any time.
Aside from our technical support service, surely the best part of renewing your license’s maintenance is being eligible for the latest software updates and version upgrades at no extra cost.

Check out our download page or contact our technical support team to find out about the latest available version or to inquire about your renewal status.

You can also visit our Documentation page to find the available help files.

Leave a comment

Privacy Preferences
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.