Before you begin, you must complete Exercise 3.4: Linking to the customer list page.
Next you create another Web interaction to use the new input page and
output pages that you just created.
To create another Web interaction:
- Locate your project WSSLABxx in the Project Explorer.

- Right-click on your project and click New > Other on the pop-up
menu.

The Select page opens.

- In the left pane of the Select page, select Web.
- In the right pane of the Select page, select Web
Interaction.
- Click Next.
The Web Interaction wizard opens.

- In the Web Interaction name field, type
getCustNumber.
- Click Next.
As you probably remember from the previous tutorial, this next page is
where you specify the input and output pages.

- Leave the Use input pages radio button selected and click
Add.
- Select custList.jsp on the Input page dialog.
Click OK.
This is the subfile that contains the list of customers. It is the
input page because from here you fill the customer number field with data from
the selected table record.
- Leave the Use output pages radio button selected and click
Add.
- Select inquiry.jsp on the Output JSP dialog.
Click OK.
- Click Next.
You have now defined your input and output pages.
Adding an iSeries ILE program to the interaction
- Note:
- Some screens in this section will look different if you choose to use the
GETDATAS service program instead of the GETDATA program to handle the Web
interaction.
Next you will select the RPG service program you will use to handle your
Web interaction.

To add a program to the Web interaction:
- Leave the Use an iSeries program or procedure radio button
selected.
- Click Add Program.
- Click Browse to browse for the service program you will
use.
If you don't see your connection then you will need to create a
connection.
Follow the steps under the next section called Creating a
connection.
If you do see your connection then skip the next section and proceed to the
section Selecting the service program.
Creating a connection
To create a connection:
- In the list in the left pane, expand the New Connection list item by
clicking on the plus sign + beside its icon.
The Name personal profile page opens.
- Accept the default profile. Click Next.
The Remote iSeries System Connection page opens.

- Leave the default value for the Parent Profile field.
- In the Host Name field, type the name of the iSeries server
(Same server name as you specified for the runtime).
- Click Finish to create a connection.
Selecting the service program
Now you select the RPG service program.
- Expand your connection.
- Expand *LIBL.
- If you see a sign-on dialog, type your user ID and password.
- If you don't see the WSSLABxx library, click Work with
libraries and type WSSLABxx in the dialog, then click
OK.
- Expand the WSSLABxx library and select the WDSCSRV service program.

- Click OK.
Most of the fields have now been filled in for you. However you must
fill in the values for the program alias and entry point fields.

- In the Program alias field, type
getCustNumber.
- In the Entry point field, type readc (case
sensitive).
- Click OK.
Adding a parameter
Let's add a parameter to the service program interface definition that
you just added. You might remember the procedure readc returns the
customer number as a parameter.
To add a parameter:
- Under Program call definitions, select the getCustNumber
program.
- Click Add Parameter.
- In the Parameter name field, type cnumber.
- Leave character in the Data type list selected
- In the Length field, type 7.
- Select Output from the Usage list.
Your wizard should now look like this:

- Click OK.
You have finished adding program parameters. Now you need to define
the binding between the output parameter and the customer number field on the
inquiry page.
- Click Next.

- You have no input parameters, so you don't need to modify this
page.
- Click Next again.
- Under Output parameters, select cnumber.

- Under Output page fields, expand /inquiry.jsp >
FORM:myForm > Simple Table and select CUSTNOI.
- Click Link in the middle of the page.
- Click Finish to link the output field to the output
parameter.
This tells the wizard to generate code to move the data from the parameter
cnumber to the customer number field on the inquiry page.
You have created an iSeries connection, selected the service program, added
an output parameter and mapped an output parameter to an output field.
Module recap
You have completed Module 3. Creating the customer list input page. You have learned how to:
- Start the product
- Set the workspace location
- Check the Web perspective is open
- Create a JSP file
- Add an iSeries table component
- Select properties for the table
- Insert a form on the page
- Add the iSeries button component
- Add iSeries button properties
- Add a heading to the page
- Link the inquiry page to the customer list page
- Create another Web interaction to use the new input page and output pages
- Begin the process to add a program to the Web interaction
- Create an iSeries connection
- Select the service program
- Add an output parameter
- Map an output parameter to an output field
Now that you have created a new input page from a subfile, linked that new
input page to the customer inquiry input page and added the iSeries business
logic (service program) and additional parameter to the existing Web
application in order to process the request to get a customer number, you are
ready to begin Module 4. Creating the update record output page.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.