Invoking a stored procedure
The Scratchpad perspective displays the called procedure. The Procedure tab displays the CREATE statement for the stored procedure in view-only mode. Use the Alter editor to update native stored procedures. For more information, see Updating a stored procedure.
To invoke a stored procedure
- In the DB2 Navigator perspective, select the required stored procedure. For more information, see Navigating to an object.
- Select the CALL command from the Commands list. The Scratchpad perspective displays the Parameters dialog box.
In the Parameters dialog box, complete the following fields and click OK:
Field
Description
DB2 Connection
Select the Db2 subsystem where you want to run the stored procedure.
Commit
Select Commit or Rollback.
Parameters Profile
Select a saved set of values to use as Input parameters.
Input parameters
Enter data for each of the parameters listed.
Save
To save the Input parameters as a profile, click Save, enter a name for the profile, and click OK.
The Output tab displays a summary of the stored procedure.
- To view results, perform one of the following actions:
- To view all results, click View All Result Sets .
- To view a specific result set, on the Output tab, click the relevant View result set.
- To save the output in a text file on your local file system, perform the following actions:
- On the toolbar, click View output text
.
- In the Output Text dialog box, click Save output text
.
- On the toolbar, click View output text
- To invoke the procedure again, perform the following actions:
- Click the Procedure tab.
- Click CALL
.
The Parameters dialog box is displayed. Return to step 3.