Editing a Stored Procedure in DB2
This section describes how to edit a stored procedure that does not have any scalar parameters but returns two cursors.
To edit a stored procedure that returns two cursors
| 1. | Open the stored procedure by double-clicking the stored procedure, or by right-clicking it and selecting Open. |
The editor opens on the right. There is no scalar parameter in this stored procedure.
| 2. | Check the Design Mode check box. |
This selection puts the editor in design mode, so you can start adding and editing parameters.
| 3. | Add and edit parameters as required. |
| 4. | Click Design By Example on the toolbar, and use the scroll bar in the Design By Example window to view the two cursors. |
Use the expand/collapse symbol on the left of the parameter name to expand/collapse cursor display.
| 5. | Click OK to include both the cursors for projection. |
| 6. | Save the stored procedure. |
For details on executing stored procedures, see Executing a Stored Procedure.