O'Reilly logo

DB2® for z/OS® Version 8 DBA Certification Guide by Susan Lawson

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

Chapter 10. Using SQL in an Application Program

• Table and view definitions

• Host variables and structures

• SQL execution validation

• Cursors

• Dynamic SQL

Suppose that you are writing an application program to access data in a DB2 database. When it executes an SQL statement, your program needs to communicate with DB2. When DB2 finishes processing an SQL statement, DB2 sends back a return code, which your program should test to examine the results of the operation.

To communicate with DB2, you need to choose one of these methods:

• Static SQL

• Dynamic SQL

• Open Database Connectivity (ODBC)

• Java Database Connectivity (JDBC) application support

Static and dynamic SQL statements can be embedded in application source programs. During the ...

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