Using an application program as a stored procedure

A stored procedure is a compiled program, stored at a DB2 local or remote server, that can execute SQL statements. A typical stored procedure contains two or more SQL statements and some manipulative or logical processing in a program. A client application program uses the SQL CALL statement to invoke the stored procedure.

Consider using stored procedures for a client/server application that does at least one of the following things:

  • Executes multiple remote SQL statements.

    Remote SQL statements can result in many network send and receive operations, which increases processor costs.

    Stored procedures ...

Get Official Introduction to DB2® for z/OS®, The, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.