You can open a stored procedure and run it using the Query Options screen in DB2 Web Query.
To run a stored procedure:
1. In the desired connection branch of the DB2 Web Query Tool navigation tree, expand the Stored Procedures section until you find the stored procedure that you want to use in your query.
2. Click the desired stored procedure. A pop up menu opens.
3. From the pop-up menu, select Open.
The Query Options page opens.
4. In the Result Name field, type the name of the results set.
Note: DB2 Web Query Tool provides a default results set name. You can replace this name with one that you prefer.
5. In the Max Rows field, type the maximum number of rows to return in the results set.
Note: To return all rows to the results set, enter "0" in the Max Rows field.
6. In the Timeout field, type a time-out limit.
7. From the Action drop down list, select an action that specifies how LOBs will be retrieved from the database. The options are as follows:
· Select Omit to omit the LOB from the result set.
· Select Retrieve to have LOBs retrievable from the results set. When you select Retrieve, LOBs will appear as links in the results set. You can click the link to view a particular LOB and DB2 Web Query will retrieve that LOB for you from the DB2 table and show it in a viewer.
· Select Embed to have the LOB data embedded in the results set
8. In the Limit field, type the maximum size (in k) of a LOB that will be available in the results set. Any LOB that is larger than the specified limit will not be embedded.
9. From the Type drop down list, specify the file type (extension) of LOBS that will be returned by your query.
· Select None to have a MIME type of APPLICATION/OCTECT returned to the client.
· Select Static to indicate that all LOB data in the table is of the same type and that the same extension should be applied to all LOBs. Specify the extension to apply to each LOB in the Ext/Column field.
· Select Column to indicate LOB data is of different types and that the type of the LOB data is stored in a column that is referenced in the query. In the Ext/Column field, type the name of the column where the LOB type extension is stored.
If you specify None, the LOB data will be sent to your browser in binary format and DB2 Web Query will rely on the browser to determine the type of data.
10. If you have SQL\PA installed on you system and your query has not been analyzed by SQL/PA, "Not Analyzed" will appear next to SQL/PA in the SQL/PA section. To analyze your query with SQL/PA, click Analyze in the SQL/PA section of the Settings section. SQL/PA analyzes one statement at a time. Therefore, if you have more than one SQL statement embedded in your query, you will see results in a cumulative format. To set your SQL/PA analysis options, click Analyze options.
Note: If you do not have SQL/PA installed, "Not Installed" will appear next to SQL/PA in the SQL/PA section.
11. In the Parsed Query area, specify the values for any variables in the Stored procedure that you are using.
12. To run the query click Run.