IBM Database Add-Ins for Visual Studio  

Creating Versions of Native SQL Procedures  (DB2 for z/OS)

You can create versions of native SQL procedures for DB2® for z/OS®. This function is supported only for DB2 for z/OS Version 9.1 or later.

A new version of a native SQL procedure has the same schema, name, parameter count, and parameter data types (in the same order) as the original, but has a different version ID. It can also have a different procedure body, different parameter names, and different options. After you create a version of a native SQL procedure, you can perform any action on the procedure version that you can perform on any other SQL procedure. For example, you can change the definition of the procedure version, deploy it, run it, and debug it.

Only one version of a native SQL procedure can be active at a time. When you create a procedure, it is the active version. When you create a version of the procedure, that version does not become the active version automatically. You must make a new version active.

To create a version of a native SQL procedure:

  1. In the Server Explorer under your DB2 for z/OS data connection, right-click the native SQL procedure, and then select New Version on the shortcut menu.

    The IBM Procedure Designer opens, with the definition of the native SQL procedure.

  2. Change the write-enabled fields in the views of the designer to specify the information for the procedure version.

    For detailed information about the fields in the designer views, see IBM Procedure Designer.

  3. Save the procedure definition. From the File menu, select Save [procedure name].

    The script of the procedure version definition is run against the database and the native SQL procedure version is created.

  4. Close the designer.

The procedure version that you create is an inactive version. All of the inactive versions of a procedure are shown under the Versions node of the procedure in the Server Explorer.


See Also

Developing IBM Database SQL and SPL Procedures | Making Native SQL Procedure Versions Active | Managing Procedures, Functions, and Objects


.NET Development Forum   DB2 FAQs

© Copyright IBM Corporation 2002, 2019. All Rights Reserved.