Chapter 6. Using Host Publisher Studio to develop J2EE applications 149
You can add, edit, or remove users in the Modify User List window (Figure 6-6).
Figure 6-6 Add, edit, or remove a user
For more details, see:
IBM WebSphere Host Publisher Administration and Users Guide
, GC31-8728
IBM WebSphere Host Publisher Programmers Guide and Reference
in the WebSphere
Host Publisher library
A Comprehensive Guide to IBM WebSphere Host Publisher Version 3.5
, SG24-6281
6.3 Creating a Host Access Integration Object
To create Integration Objects that collect data from applications on the terminal-oriented host,
use the Host Access application. To create the Integration Objects, navigate to the
information you want using a 5250 connection. Host Publisher records the keystrokes you use
and lets you define the host application windows that contain information.
This section provides a general description of the main function of Host Access using
macros to build Integration Objects.
6.3.1 Building an Integration Object using macros
The Host Access application is used to build Integration Objects that access data from a 5250
application. To do this, Host Access records macros that contain information about the way
you connect to the host, navigate to the information you want to make available to your end
users, and disconnect from the host. These macros become part of the Integration Object you
create.
150 iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0
Host Publisher uses a macro facility of IBM Host On-Demand to provide an interface where
you can interact with a host and record the actions you make. The actions are recorded as a
macro.
A macro is an XML script that defines a set of screens. Each screen includes a description of
the screen, the actions to perform for that screen, and the screen or screens that can display
after the actions are performed. See Example 6-1.
Example 6-1 Host Publisher macro example
<HAScript name="sxxboat" description="" timeout="60000" pausetime="200" promptall="false"
author="" creationdate="" supressclearevents="false" encoding="UTF8" >
<screen name="Main Menu.2" entryscreen="true" exitscreen="false" transient="false">
<description uselogic="1 and 2" >
<oia status="NOTINHIBITED" optional="false" invertmatch="false" />
<string value="OS/400 Main Menu" row="1" col="33" casesense="true"
optional="false" invertmatch="false" />
</description>
<actions>
<input value="boats[enter]" row="0" col="0" movecursor="true"
xlatehostkeys="true" encrypted="false" />
</actions>
<nextscreens timeout="0" >
<nextscreen name="iSeries WSG Boat Demo.1" />
</nextscreens>
</screen>
</screen>
...
</HAScript>
Macros work by following a sequence of host screens that are defined. By navigations
through the required application screens using a terminal emulator, the following elements
are defined:
The screens
The actions to take on each screen (that is, keystrokes)
Which screens can appear next after the action has completed for a given screen
In Host Access, there are three types of macros as shown in Figure 6-7:
Connect: This macro includes the information Host Publisher needs to connect to the
host. The connect macro should contain the steps necessary for logging on to a system
from as many initial states as possible. It should take into account different paths that
might occur because the previous connection failed or was left in an unknown state. Host
Publisher Server uses the connect macro to attempt to connect to a system and to recover
from a previously-failed connection.
Data: This macro includes information about navigating to, extracting, and organizing the
data you want to publish.
Note: Macros are not used by Integration Objects created using the Database Access
application.
Chapter 6. Using Host Publisher Studio to develop J2EE applications 151
Disconnect: This macro includes information about how and when to disconnect from the
host. Typically, this means tearing down the network connection. Disconnect macros
prepare the host connection to cleanly disconnect.
Figure 6-7 Macros
In Host Access, the connect and disconnect macros are part of the connection pool
associated with the Integration Object. Only the data macro is part of the Integration Object
itself.
Loops may also be defined within the macro and alternate paths (for example, more than one
next screen for a given screen) to follow. Host Access includes a wizard that guides you
through recording macros, but you can use the Macro menu and the toolbar (Figure 6-8) to
fine-tune them.
Figure 6-8 Host Access Studio toolbar
When you run your macro on Host Publisher Server by invoking your Integration Object, your
macro looks for the screens you defined to appear on the host terminal and execute the
actions you defined for each screen.
Integration Object chaining may improve your applications response time or decrease the
amount of macro recording you must do. See
IBM WebSphere Host Publisher Administration
and Users Guide
, GC31-8728,
or
A Comprehensive Guide to IBM WebSphere Host Publisher
Version 3.5
, SG24-6281,
for more information.

Get iSeries Access for Web V5R2 and WebSphere Host Publisher V4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.