It is a common requirement to be able to gather output data from multiple host screens and present it in a single output page, or to provide a single input page, which then supplies multiple host screens with input data. HATS provides several methods for performing these operations. The different methods include the use of screen combinations, screen customizations, transformations, macros, global variables, and Integration Objects. Which method you use depends upon the operation to be performed and the location of the data.
The following sections summarize four operations and possible HATS methods for performing them. Combining operations and HATS methods for performing them are not limited to those summarized below.
For this example, contiguous output data is defined as data all of which appears within one rectangular region on a host screen and appears at the same location on subsequent consecutive screens. An example of this would be a list of output data that does not all fit on one screen. In this example, using a terminal emulator a user must navigate forward through consecutive screens to view all of the data. No matter what screen the user views, the data appears within the same location on the display screen.
For this type of data, you can use a HATS screen combination to gather the whole multi-screen block of contiguous data into a single scrollable GUI for the user. A screen combination is one type of HATS screen event. For more information about screen events and creating and editing screen combinations see Working with screen events.
For this example, noncontiguous output data is defined as output data that appears in multiple rectangular regions on a host screen and may appear at different locations on other, not necessarily consecutive, screens of the same host application. Examples of this would be any data that might be spread throughout multiple screens of a host application.
To combine this type of data, you can use HATS macros to automatically navigate through the host screens and use the macro Add Extract Action function either to gather data into global variables for later display in a single transformation or to use a HATS macro event handler transformation to display the data. For information about using HATS macros, see Macros and host terminal. For information about using HATS global variables, see Interacting with global variables.
This example assumes that output data, whether contiguous or noncontiguous as defined above, originates from multiple host applications. These host applications can be located on the same host system or different host systems.
To gather data from multiple host applications, you can use HATS Integration Objects and HATS support for background connections to multiple host applications. Integration Objects are Java™ beans that encapsulate interactions with a host application. They are generated from HATS macros and can be driven by Model 1 Web pages.
For each host application, create a background connection and connect, disconnect, and data macros. Create the data macros to accept the appropriate input, navigate through the screens of the application, and extract the data you want to display for the user. From each data macro, generate an Integration Object. From one of the Integration Objects, generate Model 1 Web pages that will pass input to the Integration Object and display the output extracted by the Integration Object. Then edit the output Web page and use the HATS tool to Insert Integration Objects Properties to run the other Integration Objects and add their output to the same Web page. While editing the output Web page you can organize the output from the multiple Integration Objects (that is, from the multiple host applications) in any way you like to combine the data for display to the user. For information about using HATS Integration Objects, see Using Integration Objects. For information about defining HATS connections, see Managing connections.
To provide a single input page, which then supplies multiple host screens in the same application with input data, you can use transformations, global variables, and macros. For example, use a transformation to collect the input data into global variables. One method is to use the Global Variable Overrides function, enabled on the Other tab of the Project Settings editor, to allow users to input data on the transformation that will initialize the global variables. See Global variable overrides for more information. Then create a macro that navigates through multiple host screens using the values of the global variables as input, and put a button on the transformation the user can click to run the macro.
To supply input to multiple host applications, you can use Integration Objects running on multiple background connections similar to the method described in the section, Combining output from multiple applications. While building the macros from which the Integration Objects will be generated, you can use the Add Prompt Action function to create prompts for the input, or you can use the Global Variable Overrides function described above.