Stored Procedures

Team-Fly    

 
DB2 Universal Database for OS/390 v7.1 Application Certification Guide
By Susan Lawson
Table of Contents
Chapter 8.  Stored Procedures

Stored Procedures

A stored procedure is essentially a program that is stored and executed within the control of the DBMS. Some DBMS products limit stored procedures to a subset of SQL functionality. DB2 implements stored procedures as externally compiled programs that run within specialized DB2 address spaces.

All DB2 stored procedures are compiled programs stored in a load library available at the DB2 server. The DB2 server can be either the local DB2 subsystem or a remote DB2 subsystem. These programs can execute SQL statements, connect to other DB2 servers, and retrieve data from non-database sources. A stored procedure typically contains two or more SQL statements and some manipulative or logical processing in a host language. A client application program uses the SQL CALL statement to invoke a stored procedure.

 EXEC SQL  CALL MYSP (:parm1, :parm2, :parm3) END-EXEC. 

Team-Fly    
Top


DB2 Universal Database for OS. 390 v7. 1 Application Certification Guide
DB2(R) Universal Database for OS/390 V7.1 Application Certification Guide (IBM DB2 Certification Guide Series)
ISBN: 0131007718
EAN: 2147483647
Year: 2002
Pages: 163
Authors: Susan Lawson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net