PASSPORT Knowledge Base
Object Interface

Date Published: November 12, 2004
Date Updated: March 13, 2008

Title

Starting Multiple Sessions

Product

PASSPORT PC to Host

Emulation Types

TN3270, TN5250, VT, SCO ANSI, Wyse 60

Issue

I want to write an application to start multiple instances of PASSPORT using the default configuration file PASSPORT.ZWS. What do I need to do to start more than one session?

Solution

In order to start multiple PASSPORT sessions, you must create a separate configuration file for each session that you want to start. Below is an example of the code used to open multiple sessions with the PASSPORT Object layer (PASSPORT version 2002 or higher is required).

Example

Below is sample VBScript code that opens multiple PASSPORT sessions:

 

Function Sessions_Open()

Dim Sys, Sess

Set Sys = CreateObject("PASSPORT.System")

MsgBox "Press to open session named SESS1"

Set Sess = Sys.Sessions.Open("C:\Program Files\PASSPORT\SESS1.ZWS")

If Sess Is Nothing Then

   MsgBox "Failed to open session SESS1"

Else

   MsgBox "Session SESS1 opened successfully"

End If

MsgBox "Press to open session named SESS2"

Set Sess = Sys.Sessions.Open("C:\Program Files\PASSPORT\SESS2.ZWS")

If Sess Is Nothing Then

   MsgBox "Failed to open session SESS2"

Else

   MsgBox "Session SESS2 opened successfully"

End If

    MsgBox "Press to open session named SESS3"

Set Sess = Sys.Sessions.Open("C:\Program Files\PASSPORT\SESS3.ZWS")

If Sess Is Nothing Then

   MsgBox "Failed to open session SESS3"

Else

   MsgBox "Session SESS3 opened successfully"

End If

End Function

More Information

Keywords

api, object, screen, application, integration, keystrokes, automation, session, multiple