To create a DB2® stored
procedure, do these steps.
Before you begin
Before
creating your stored procedure, you must have a source data set to
store your procedure in. You must also be connected to the database,
and the correct mapping (PL/I or COBOL) must be configured.
Procedure
- Right-click the Stored Procedures folder in a Data Development
project in the Data Project Explorer view.
- Select New->Stored Procedure. The Stored Procedure wizard is displayed.
- Make sure the correct project name is shown and select Next.
- In the Language field, select COBOL or PLI,
and select Next.
- Specify the name of the stored procedure and click Next.
- Specify the data set in which your stored procedure should
be created.
- Specify SQL statement and options, including result sets.
Select Next and then use the Browse buttons
to specify the Connected system, z/OS® Filter
String, and Source data set.
- Specify stored procedure parameters and their associated
characteristics.
- Specify the collection ID.
- Click the Advanced button to specify
deploy and other options. See the context-sensitive helps
for descriptions of the fields on this window
- When you are finished entering options, click Finish. The source of the stored procedure is displayed in the
editor.
Results
Now you can edit the source code.