Define an SQL procedure

If you want to define a set of SQL statements as a procedure you can call from an SQL program, you must first define it on the system.

To create an SQL procedure:

  1. In the System i Navigator window, expand the system you want to use.
  2. Expand Databases.
  3. Expand the database and schema that you want to work with.
  4. Right-click the Procedures container and select New, then SQL.

To define your SQL procedure on the New SQL Procedure dialog, use the following steps for the tabs.