Starts a BlueZone Display session.
Parameters:
SessionTypeVal - 0 - Mainframe; 1 - iSeries; 2 - VT
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. See Error Codes for a complete listing of error code descriptions.
Remarks:
The OpenSession function will wait 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 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 will return 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 Host = CreateObject( "BZWhll.WhllObj" )
ResultCode = Host.OpenSession( 0, 2, "System2.zmd", 60, 2 )
If ( ResultCode ) Then
Host.MsgBox "Error connecting to host system!", 0
End Sub
End If
ResultCode = Host.Connect( "A" )
If ( ResultCode ) Then
Hsot.MsgBox "Error connecting to session A!", 0
End Sub
End If
'continue with script execution
Host.CloseSession 0, 2