CloseSession

Disconnects from the host system and closes the BlueZone Display session window.

Parameters:

SessionTypeVal  -  0 - Mainframe; 1 - iSeries; 2 - VT

SessionIdentifierVal  -  1 for S1, 2 for S2, 3 for S3, etc.

Returns:

0 for success; or a non-zero error code.  See Error Codes for a complete listing of error code descriptions.

Remarks:

The CloseSession function can be used to end a session started with the OpenSession function

Starting with BlueZone version 3.3, the CloseSession method will work with BlueZone Web-to-Host when using the Embedded Client Mode.

NOTE: The embedded BlueZone session must first be connected to the program or script by using the Connect method.

Example:

Set Host = CreateObject( "BZWhll.WhllObj" )

 

Host.OpenSession 0, 2, "System2.Zmd", 30, 1

 

ResultCode = Host.Connect( "A" )

If ( ResultCode = 0 ) Then

      ' interact with host

End If

 

Host.CloseSession 0, 1