Populating a structure with field definitions

If you have physical or logical files in a library on an iSeries host, you can use the fields defined within those files as the parameters in the structure that you are defining in the Web Interaction wizard. You use the Specify the Input and Output Parameters for your iSeries Host Program page of the Web Interaction wizard. To add field definitions to this page:
  1. Select Use an iSeries program or procedure if it is not already selected.
  2. Select Add Structure, enter a name in Structure name, and click OK.
  3. Right-click the structure in the Program call definitions area and select Add Database Reference Field to open the Specify Database Reference Field window.
  4. Click the plus icon beside New Connection to open the New Connection window, which is used to define connection information for an iSeries host.
  5. Enter a profile name if you have not previously defined one, and complete the remaining fields to define your connection to the iSeries host that you identify. Click Finish to add the connection to the Specify Database Reference Field window.
  6. To connect to the iSeries host, click the plus icon beside your connection name, then click the plus icon beside *LIBL to open the Enter Password window. Enter your password and click OK to connect to the system.
  7. Navigate the library list to locate the file containing the record you want to use.
  8. Expand the record to see the list of fields. For each field that you want to add to your structure, select the field and click Add. Select and add the fields that you require. Both the fields and their attributes are added to the structure definition in the Web Interaction wizard.
    Tip: If you want to add all of the fields in the record as parameters, select the record and click Add.
  9. Select Close to return to the Web Interaction wizard.
  10. To add the structure to your program definition as a parameter:
    1. Select your program in the Program call definitions area and click Add Parameter.
    2. Enter a parameter name that represents the structure.
    3. For Data type, select structure in the list of data types, select the structure in the Structure name list, select a usage for the parameter in the Usage field, and click OK to add the structure to your program definition.
    When you expand the structure under the program, the fields that you defined for the structure are included.