Working with Stored Procedures

Important: Any machine on which a PL/I stored procedure is executed must have either Enterprise Server or Enterprise Server for Stored Procedures product installed and licensed. Contact OpenText Support for Micro Focus Products for more information.

Set up the initial environment

See Configuring the Environment for Developing RDBMS Applications on UNIX.

In addition, see the IBM documentation for Building COBOL Routines.

Prepare and execute stored procedures

  1. Code and prepare a stored procedure. See Writing and Preparing Stored Procedures for instructions.
  2. Code and prepare an application that calls the stored procedure. An SQL statement, CALL, in that application must use the same parameter list and linkage convention as the stored procedure that it invokes. See Writing and Preparing Applications to Use Stored Procedures for instructions.
  3. Define your stored procedure to the DB2 LUW Server by issuing a CREATE PROCEDURE command, which will place a row in the appropriate system table(s). See Defining Stored Procedures under DB2 LUW for additional details.
  4. Compile and link your stored procedure. See Compiling and Linking Stored Procedures under DB2 LUW for additional details.
  5. Debug and test your stored procedure. See Debugging Stored Procedures under DB2 LUW for additional details.