Creating multiple versions of external procedures and external SQL procedures

For native SQL procedures, you can use DB2® to create and maintain multiple versions of the procedure. For external SQL procedures and other external procedures, you must manually maintain multiple versions of the procedures.

Procedure

To create multiple versions of external procedures and external SQL procedures, use one of the following techniques:

  • Define multiple procedures with the same name in different schemas. You can subsequently use the SQL path to determine which version of the procedure is to be used by a calling program.
  • Define multiple versions of the executable code. You can subsequently use a particular version by specifying the name of the load module for the version that you want to use on the EXTERNAL clause of the CREATE PROCEDURE statement or ALTER PROCEDURE statement.
  • Define multiple packages for a procedure. You can subsequently use the COLLID option, the CURRENT PACKAGESET special register, or the CURRENT PACKAGE PATH special register to specify which version of the procedure is to be used by the calling application.
  • Set up multiple WLM environments to use different versions of a procedure.