Rational Developer for System z

Creating a stored procedure

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

  1. Right-click the Stored Procedures folder in a Data Development project in the Data Project Explorer view.
  2. Select New->Stored Procedure. The Stored Procedure wizard is displayed.
  3. Make sure the correct project name is shown and select Next.
  4. In the Language field, select COBOL or PLI, and select Next.
  5. Specify the name of the stored procedure and click Next.
  6. Specify the data set in which your stored procedure should be created.
  7. 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.
  8. Specify stored procedure parameters and their associated characteristics.
  9. Specify the collection ID.
  10. Click the Advanced button to specify deploy and other options. See the context-sensitive helps for descriptions of the fields on this window
  11. 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.

Feedback