Communications/Transactions Guide and Reference


Using EHLLAPI with VisualAge

You can use VisualAge to build a workstation-based, graphical user interface that can access host applications designed for 3270 terminals. Rather than requiring users to enter data in a 3270 terminal emulator session, a VisualAge application can interact directly with the host application. From the host application's perspective, the VisualAge application functions like a user at a 3270 terminal.

To communicate with host applications, VisualAge uses the EHLLAPI, a feature provided by 3270 terminal emulators such as PComm V4.1.


Tip
You can configure the DLL name and entry point name used by VisualAge to use your favorite emulator, as long as it conforms to HLLAPI. You must create a class method in the application's application class called startUp. The following example configures VisualAge to use the IBM Communications Manager V2.1 emulator:
startup                                                                 
    Abt3270Hllapi dllName: 'acs3ehap'.                           
    Abt3270Hllapi entryPointName: 'HLLAPI'.
    AbtHllapiStructures wordBoundary: False.
    Abt3270HllapiPMSubApp callingConvention: #c16.                        

For OS/2 you must specify the calling convention used as well as the word boundary of the record structure. The callingConvention: method tells VisualAge Smalltalk 3270 support if it's to use 16 bit or 32 bit, C or Pascal call convention. The wordBoundary: method must be used to let VisualAge Smalltalk 3270 support know whether to the use of the PComm V4.1 32 bit record structure or the older Communications Manager V2.1 16 bit record structure for EHLLAPI calls.

For Windows, VisualAge Smalltalk 3270 support provides methods supporting both the IBM and Attachmate EHLLAPI products. VisualAge Smalltalk 3270 support assumes the IBM product by default. To switch between each of the vendor products, execute one of the following Smalltalk statements from the System Transcript window or a workspace:

"Execute the following to switch from IBM support to Attachmate"
Abt3270HllapiWinSubApp selectAttachmate.
 
"Execute the following to switch from Attachmate support to IBM"
Abt3270HllapiWinSubApp selectIBM.
 

To communicate with 3270-based applications, VisualAge uses the 3270 Screen part, located in the 3270 HLLAPI category on the parts palette. Each 3270 Screen part represents a specific host menu, panel, or other screen. To interact with multiple panels of a host application, you simply use multiple 3270 Screen parts, each set up for a different host panel.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]