Testing stored procedures
Use the Call Stored Procedure panel to invoke procedures you need to test. You can use the panel to enter data for all the IN (P) and INOUT (B) parameters before invoking the stored procedure. You can also use the panel to select commit and output options.
To call a stored procedure
- Generate a list of stored procedures (NP or PR).
For information, see Generating-lists-in-Catalog-Manager. In the C column, type CALL next to the stored procedure you want to invoke and press Enter.
The Call Stored Procedure panel is displayed.Call Stored Procedure 1 to 1 of 1
Command ===> Scroll ===> PAGE
Call Procedure . . . . . . Y Y to call procedure
Commit . . . . . . . . . . R C-Commit, R-Rollback, N-None
Output format. . . . . . . C C/R C-Column format, R-Row format
Schema . . . . . . . . . . SYSPROC
Name . . . . . . . . . . . ADMIN_INFO_SYSPARM
Parm Parm
Parm name P/B type len Parm data
-------------------------------------------------------------------------------
DB2_MEMBER P VARCHAR 8
******************************* Bottom of data ********************************- In the Call Procedure field, type Y to invoke the stored procedure.
In the Commit field, type one of the following values:
Value
Description
C
The testing process performs a COMMIT when the stored procedure returns an SQLCODE 0. If the stored procedure returns an error, the testing process performs a ROLLBACK.
R
The testing process performs a ROLLBACK after the stored procedure finishes executing.
N
The testing process performs neither a COMMIT or ROLLBACK after the stored procedure finishes executing.
In the Output format field, type one of the following values to select the order in which the results of the stored procedure are written to the SQL output data set:
Value
Description
C
Column format writes all data for a row on a single line with headings above each column of data
R
Row format writes each column of data on a new line with headings to the left of the data
- In the parameter fields listed at the bottom of the panel, enter appropriate values for each parameter.
- Press Enter.
The results are written to the SQL output data set and displayed in a ISPF Browse panel.
Result
You can format the results of the called stored procedure in columns or rows. Regardless of the output format selected on the Call Stored Procedure panel the output of the parameters is always in Row format. If the called stored procedure returns an error, the SQL Error Message panel displays the details of the SQLCODE returned before displaying the results of the stored procedure.