Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

NoNameTypeOptionalDefaultDescription
1qws_pathStringNo-

Fully qualified path to QWS3270 application

2hostStringNo-

Host to connect to. (either IP address or host name)

3sess_idStringYes"A"

Session ID the user is requesting. On return will contain the assigned session ID which may or may not be different

4portLongYes23

Remote host port number

5term_typeStringYes"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

...

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)

...