CloseSession

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

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.
Returns
0 for success; or a non-zero error code. Refer to Error codes for a complete listing of error code descriptions.
Remarks
CloseSession can be used to end a session started with the OpenSession method.
Starting with BlueZone version 3.3, the CloseSession method works 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 bzhao = CreateObject( "BZWhll.WhllObj" )
bzhao.OpenSession 0, 1, "System2.Zmd", 30, 1
ResultCode = bzhao.Connect( "A" )
If ( ResultCode = 0 ) Then
   ' interact with host
End If
bzhao.CloseSession 0, 1