Opening a Connection

The Component Enabler interface is very much like a programmatic terminal interface. You must still perform all of the tasks that you would when connecting your terminal emulator to your application, that is, you must connect to the host, perhaps log on, and perhaps start your application system. You might omit some of these steps on your particular system. The c method performs all these steps for you with one call.

To do this, a number of parameters must be defined to specify the location of the host, the location of the generated Component Enabler data component class files for the system and the name of the system running on the host.

The following table shows the properties that you must define before you attempt the connection:

Parameter

Description

TCP/IP Address

Defines the TCP/IP address of the server running the host application.

Port No

Defines the port number which the Remote Access server is using to listen for Component Enabler connection requests. The default port number used is 2889.

Application Prefix

Defines the application prefix to be used when accessing the generated data components. This is the same prefix that you entered in the application details dialog of the Generator.

Application

Name

Defines the application name to be used when accessing the generated data components. This is the same name that you entered in the application details dialog of the Generator

Bundle Name

Defines the Bundle name to be used when accessing the generated data components.

View Name

Defines the View name to be used on the application server. The View is defined on the host, and associates a particular Agile Business Suite System with the View.

If the usercode and password have not been predefined in the View configured on the application server, you must also supply the following parameters:

Parameter

Description

Usercode

Defines the usercode to use when connecting to the host.

Password

Defines the password to use when connecting to the host.

For an Agile Business Suite System running on a Windows operating system server, the DomainName property must also be defined before attempting the Connect method.

The following example of Visual Basic code uses these properties to connect to a host application:

Dim Result as ResponseCode’ActiveLINC Response code
’Create new instance of LINCApp interface object
Set LINCApp = New ActiveLINCConnection

’set up connection parameters
With LINCApp
      .ApplicationName = "sample2r1"
      .PackagePrefix = "com.unisys"
      .BundleName = "all"
      .IPAddress = "LINCHOST"
      .PortNo = 2889
      .ViewName = "SAMPLE"
End With

’Connect
Result = LINCApp.Connect

’Check we connected OK. If not display the error number
If Result <> alOK Then
      MsgBox "Cannot connect. Error code is " & Str$(Result)
End If

After this code has been executed, the Visual Basic client has connected to the host application referenced by the ViewName, and the host system has returned the initial screen (fireup Ispec) to the client application.

Note: If your system does not have a fireup Ispec, you need to load your first Ispec, or change your version of the wrapper to load the first Ispec for you.