Exercise 5.4: Defining the iSeries GETDATAS service program invocation and parameters

Before you begin, you must complete Exercise 5.2: Specifying the input and output page.

The next page asks you to define the parameters you want to pass between the Web pages and the iSeries service program that processes the requests.

Here you will re-use the PCML program interface definition that was created when you compiled your source member.


Importing PCML

Getting the program interface definitions

To get the program interface definitions that you want to call on the iSeries:

  1. Click Import PCML.

    The Import PCML dialog opens.
    Selecting Remote File System

  2. Click the arrow on the Select PCML file from field.
  3. Select Remote File System from the list.

    The Browse For File dialog opens.
    Locating the PCML file

  4. Expand the tree view of *LIBL and then look for the library WSSLABxx where the RPG service program source is stored. You will use the source file to generate the PCML.

    It should be in WSSLABxx/QRPGLESRC/GETDATAS.
    Selecting GETDATAS in WSSLABxx

  5. Select the correct file.
  6. Click OK.
  7. The Import PCML dialog appears with a list of the program interface constructs contained in the PCML file.
    Select All

  8. Click Select All.
  9. Click OK.

Specifying the input and output parameters

The Specify the Input and Output Parameters for your iSeries Host Program page opens again, now containing the program description you just imported.
Updating the behavior of the CUSTNOI parameter

  1. Expand GETRECORD in the left pane under Program call definitions.

    The information from the PCML file gets included in the right pane and the parameters defined for this program appear.

  2. Select the first parameter CUSTNOI.
  3. In the right pane, change the Usage field from input & output to input to indicate that this parameter is used to pass a value from the Web page to the program.
  4. Click OK
    Updating the behavior of CUST1 parameter
  5. In the left pane select the CUST1 parameter.
  6. In the right pane, change the Usage field from input & output to output, indicating that this parameter is used to pass a value from the program to the result Web page.
  7. Click OK.
  8. Do the same for the FEEDBACK parameter.
    Associate GETDATAS with this interaction
  9. Now select GETRECORD in the left pane under Program call definitions.

    This will fill the right pane with the program information.

  10. Change the name of the service program to GETDATAS.
  11. Select the Program type *SRVPGM.
  12. In the right pane, select the check box Associate this program with the interaction.
  13. Click OK.
  14. Click Next.

You have defined the program interface definitions and now you are ready to begin Exercise 5.5: Defining the input page content.