Starts a BlueZone Display session.
- Parameters
- SessionTypeVal
- 0 - Mainframe; 1 - iSeries; 2 - VT; 3 - UTS; 4 - T27; 6 - 6530
- SessionIdentifierVal
- 1 for S1: 2 for S2; 3 for S3; etc.
- ConfigFileStr
- Name of the BlueZone Configuration File.
- TimeoutVal
- Number of seconds before returning with error.
- WaitPaintsVal
- Number of screen paints before proceeding with script.
- Returns
- 0 for success; or a non-zero error code. Refer to Error codes for
a complete listing of error code descriptions.
- Remarks
- The OpenSession function waits for the specified number of screen paints to
occur in the BlueZone session before continuing with script execution. This number
is usually one (1) on Mainframe, VT, and 6530 systems and two (2) on iSeries
systems. If the number of seconds specified in the TimeoutVal
parameter elapses before the number of specified screen paints have occurred in
the BlueZone session, then OpenSession returns with a non-zero
error code.
- The CloseSession function can be used to end
a session started with the OpenSession function.
- Example
UserId = "John"
Password = "Smith"
Set bzhao = CreateObject( "BZWhll.WhllObj" )
ResultCode = bzhao.OpenSession( 0, 1, "System2.zmd", 60, 2 )
If ( ResultCode ) Then
bzhao.MsgBox "Error connecting to host system!", 0
End Sub
End If
ResultCode = Host.Connect( "A" )
If ( ResultCode ) Then
bzhao.MsgBox "Error connecting to session A!", 0
End Sub
End If
'continue with script execution
bzhao.CloseSession 0, 1