Stored procedure samples

Db2 provides a set of stored procedure sample applications. These sample applications demonstrate different ways that a stored procedure can be used by a client to issue Db2 commands to a Db2 server.

Most of these applications prepare and run two programs. One program prepares a stored procedure, and one program executes a client program that calls the stored procedure and returns some response.

Db2 provides the following stored procedure samples:

  • A sample stored procedure without a result set
  • A sample stored procedure with a result set
  • Samples that invoke the following utilities stored procedures:
    • DSNUTILS
    • DSNUTILU
    • DSNUTILV
  • A sample that invokes the stored procedure WLM_REFRESH, which refreshes the WLM environment
  • A sample that invokes the stored procedure ADMIN_INFO_SYSPARM, which lists the settings of subsystem parameters
  • A sample stored procedure that uses IMS Open Database Access (ODBA) support
  • Two samples of external SQL procedures

All of these samples are part of the installation verification samples, which are located in prefix.NEW.SDSNSAMP. The installation CLIST tailored and loaded these jobs during your installation or migration to new-function mode.

To edit any of these sample jobs, specify the appropriate fields on the installation panels. Using the installation panels is the only method that you can use to edit these jobs.

Before you run the sample stored procedures, ensure that you have completed one of the following tasks: