Running Java Stored Procedures
- Use the menu option in the SQL editor pop-up menu.
- Use the menu option in the SQL editor pop-up menu.
- Use the
Run toolbar button. - Open the pop-up menu for a stored procedure object in the Catalog navigation and select the Call Routine option.
All methods look for an existing Db2® for z/OS® run configuration that matches the file in context. If no match exists the tooling creates a run configuration for the file in context and uses it. If necessary, the Run Routine window opens to prompt you for variable or parameter values. If the SQL statement has been run against the active database recently, the window can be populated with recent values for the Data Type, Null, and Value fields.
The Input Parameters dialog includes Load and Save options, allowing users to export parameter values to an XML file or load them back later. This is especially useful for large or frequently reused parameter sets. The dialog displays single-line fields for basic types and multi-line fields for XML and LOB types.
The results of the call operation are shown in the Execution Status dialog, where you can see any warnings or errors and link to more information about SQL codes and status. The CALL request is also added to the Query History folder of the Db2 for z/OS connection.
Creating a run configuration
-
To open the Run Configurations window, click Run > Run Configurations.
- In the navigation list, right-click Db2 for z/OS Routine and select New Configuration. A new configuration is added to the list as a child of Db2 for z/OS Routine, and the configuration page opens in the Run Configurations editor pane.
- On the new configuration page, click Browse, then enter a search string (for example, *.spsql) in the text field. This string matches all stored procedures defined in a local or remote z/OS project in the z/OS Projects view.
- Select a stored procedure from the list, and click OK.
- In the Name field on the new configuration page, enter a name for the new configuration.
- To save the run configuration, click Apply.