Chapter 2. Integrating HATS with business applications 111
b. In the Define Screen Recognition Criteria window (Figure 2-43), using
your mouse pointer, select the Find Data in Query Manager Table text
and click Next.
Figure 2-43 Defining a screen
c. On the following panel, click Next again and then click Finish.
112 Using IBM WebSphere Host Access Transformation Services V5
d. In the Add Prompt Action window (Figure 2-44), notice the Handle Macro
Prompt option. You have three different options:
• Show handler allows you to specify which JSP file to render the
default transformation. A default macro handler is shipped with HATS,
and it is named default.jsp.
• Set prompt to string is used when you know what value should be
returned from a prompt. You can enter that string in the String field.
• Set prompt to global variable is used when you want the value of the
prompt to be provided by a global variable. Enter a name for the global
variable in the name field or select an existing variable using the
• If you have a User List in your project, use Set prompt to property
from User List to set the user and password. Using this feature, the
values for User and Password are completed by HATS and you need
only to press Enter to continue with your application. We use a
combination of a macro and a User List in 2.4.2, “Using a User List in a
VT transformation” on page 158.
Complete with the name of the variable. In this example, for Name, type
productid. Leave the default values and click OK.
Chapter 2. Integrating HATS with business applications 115
15.Save the macro. Click the Save Macro button as shown in Figure 2-47.
Figure 2-47 Macro saving
Testing the macro
After you finish recording the macro, you can test the entire macro using the Play
macro button. Remember that we started with the record on the AS/400 Main
1. Return to AS/400 Main Menu screen. Depending on what screen you are on,
press PF12 or PF3.
2. When you reach the AS/400 Main Menu screen, click the Play Macro button
as shown in Figure 2-48.
Figure 2-48 Macro play
3. The Supply Prompt Values window (Figure 2-49) asks you to enter the
productid value that the macro will use in the Add Prompt Action created in
the previous section.
Type a valid value for your database (in this case FI-SW-01) and click OK.
Figure 2-49 Macro input
If the macro completes successfully, you see the results page as shown in