Start an instance of QWS3270 by specifying startup parameters. Only one session with any session ID can be open at one time. This means that the session ID actually assigned may or may not be the one requested!
Function Start(qws_path As String, host As String, [sess_id As String = "A"], [port As Long = 23], [term_type As String = "IBM-3278-2-E"], [lu_name As String]) As Long
Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
1 | qws_path | String | No | - | Fully qualified path to QWS3270 application |
2 | host | String | No | - | Host to connect to. (either IP address or host name) |
3 | sess_id | String | Yes | "A" | Session ID the user is requesting. On return will contain the assigned session ID which may or may not be different |
4 | port | Long | Yes | 23 | Remote host port number |
5 | term_type | String | Yes | "IBM-3278-2-E" | Requested terminal type. This parameter must be in the same form as the terminal types listed in QWS3270 |
6 | lu_name | String | Yes | - | Requested LU Name |
Return Code | Description | ||||
JGS_OK | Success | ||||
JGS_PARAMETERERROR | Missing or invalid parameter or invalid session ID | ||||
JGS_SYSERROR | The function failed due to a system error | ||||
JGS_TOO_MANY_SESSIONS | Only one session is allowed for any session ID (see Remarks) | ||||
JGS_CREATE_PROCESS | Unable to create new process for QWS3270 application |
Remarks
We will attempt to start the application with the specified session ID. If that ID is already in use, we will find the last (Z – A) open session ID and use that one. It is important to compare the returned session ID with the requested one before using it to connect to the session. If all 26 session IDs are already in use, you will not be able to add another session and the new instance of QWS3270 will display an error.
Sample Code
Dim myPath as String
Dim myHost as String
Dim mySession as String
Dim result as Long
myPath = "C:\Program Files\QWS3270\qws3270p.exe"
myHost = "locis.loc.gov"
mySession = "A"
result = sess.Start(myPath, myHost, mySession)
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.