O'Reilly logo

DB2® Universal Database for OS/390® Version 7.1 Certification Guide by Susan Lawson, Richard Yevich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Stored Procedures

A stored procedure is a compiled program which is stored at a local or remote DB2 server. This procedure can execute SQL statements, as well as connect to other DB2 servers and retrieve data from non-database systems. 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)

A thread invoked SQL to call the stored
procedure passing it a series of parameters
that match the stored procedure definition

One of the main reasons for using stored procedures is to reduce the network traffic in a distributed environment caused by client ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required