Host Session Emulation

H

Hendy88

Hello all,

I was wondering if anyone has experience with the BlueZone terminal
emulation program. Some companies have made the switch from Extra! to
BZ. Anyway, I have a question as to how the OpenSession command works
in an Excel macro (or is supposed to work). And here's my problem...

After I've established the host object with:

Set Host = CreateObject("BZWhll.Whllobj")

I then am working with up to FOUR different sessions at the company I
work for. We'll call these sessions A, B, X, and Y. Typically though,
only two of these four are open at any one time. Should the user not
have ANY sessions open when the macro runs, the following commands then
open new session windows and name them accordingly:

Host.OpenSession 0, 1, "ASESSION", 30, 1
Host.OpenSession 0, 2, "BSESSION", 30, 1

Where the variables above are Host.OpenSession [SessionTypeVal],
[SessionIdentifierVal], ["ConfigFileStr"], [TimeoutVal],
[WaitPaintsVal]

SessionTypeVal - 0 - Mainframe; 1 - iSeries
SessionIdentifierVal - 1 for S1, 2 for S2, 3 for S3, ... , 99 for S99.
ConfigFileStr - Name of the BlueZone Configuration File.
TimeoutVal - Number of seconds before returning with error.
WaitPaintsVal - Number of screen paints before proceeding with script.

However, the problem comes in where perhaps someone ALREADY has the
sessions open on their desktop that are something else. I.E., someone
clicked on XSESSION and that got assigned to (S1), and then clicked on
YSESSION next which got assigned to (S2).

Even though in the command I specified I wanted to OpenSession 0, 1,
"ASESSION", when the macro runs, it brings up the Session 1 (S1) window
(which in this senario is XSESSION), and STOPS mid string, without
continuing to the "ASESSION" part to rename the window.

I so I guess my question is this... is there a way to tell what
sessions are currently open (if any), and if there are any open, what
the names of them are and what session number they are currently
assigned to? That way I can tell if Session 1 (S1) is what's it's
supposed to be, etc, etc.

OR, regardless of what Session numbers are open (S1, S2, S99), is there
a way to tell if the name is already assigned to one of those, so the
macro doesn't try and open a new window. Because if it does, an error
comes up that the LU / Pool Name it's trying to connect to is already
in use by another sesssion, bla bla bla.

Something maybe like (and don't laugh at this coding):

For All.Open.Sessions
If Session.Name = "DESIREDSESSION" Then
SessNum = Session.Number
Else
OpenSession 0, 1, "DESIREDSESSION", 30, 1
End If
Next Session
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top