Running DB2 routines

After you create and build a routine such as a stored procedure or user-defined function, you can run the routine on the DB2 database server.

To run a routine:

  1. Switch to the Data perspective.

  2. Optional: Change the run settings. For example, you can specify SQL statements that you want to run before and after you run the routine.

  3. In either the Database Explorer view or the Data Definition view, right-click the routine that you want to run, and click Run. The routine runs on the database server.

  4. View the results that correspond to the run action in the DB Output view. You can view messages, parameters, and result sets.

 

Related concepts

Developing DB2 user-defined functions
Overview of DB2 stored procedures tasks
DB Output view

 

Related tasks

Changing stored procedure build settings for DB2 Universal Database for z/OS
Building DB2 routines
Changing run settings for DB2 routines

Related reference
Stored procedure and user-defined function support by DB2 Universal Database server type