Home About Courses Schedule Services Webinars Contact Search

Db2 for z/OS Embedded SQL Programming


Duration: 2 Days

Method: Instructor led, Hands-on workshops

Price: $1125.00

Course Code: DB1001

View Related Video


Programmers, application developers and computer analysts who are exposed to, or are required to perform the activities associated with application development and implementation in a Db2 environment.


Db2 SQL and Application Programming is a 2 day course targeting the needs of programmers and developers writing applications that access data stored in the Db2 environment. The presentation is an integrated mixture of lecture and workshop activities that introduce and reinforce the basic techniques and approaches to relational database technology as implemented in Db2. Topics covered include structure and manipulation of Db2 data, operational considerations in both on-line and batch environments; integrity; embedded programming techniques and preparation; and an introduction to performance analysis.Material comprising the course is consistent with Db2 for z/OS. The workshop activities follow the classroom material and are designed for both topic reinforcement and practice. Programming topics are supported by workshops in both the on-line and batch environment, this includes precompiling, compiling, linking, and the various options of the Db2 BIND.This class may be taken in conjunction with the 3-day DB1000: Db2 SQL for Everyone class. The combined course is, DB1010: Db2 for z/OS SQL & Application Programming.


Upon successful completion of this course, the student will be able to:

  • Describe the overall purpose of, and the approaches to manipulating data in a database management system
  • List the features of Db2 for z/OS
  • Describe the major objects used by Db2 for data manipulation
  • Translate and code business problems in Structured Query Language
  • Embed SQL in COBOL programs
  • Prepare COBOL programs containing embedded SQL statements for execution in the z/OS batch environment
  • Process multi-row tables with Db2 cursors
  • State the internal approaches utilized by Db2 for accessing data


Basic programming skills in the COBOL environment and familiarity with the z/OS environment and TSO/ISPF. A basic understanding of SQL.


  1. Db2 on the z/OS Platform
    • The Db2 Family
    • The Db2 Environment on z/OS
    • Stored Procedures
    • Databases and Schemas
    • Tablespaces
    • Indexes
    • The Db2 Catalog
    • Structured Query Language
  2. Introduction to Embedded SQL
    • Program Preparation Overview
    • SQL Program Development Steps
    • Retrieving Data with SELECT...INTO
    • Indicators in UPDATE and INSERT
    • The SQL Communications Area
    • Error Handling
  3. Program Preparation
    • Program Preparation Steps
    • DCLGEN
    • Program Preparation with Precompiler
    • Program Preparation with Coprocessor
    • The TSO Terminal Monitor Program
    • The DSN RUN Subcommand
    • TSO Batch Attachment
    • Program Execution
    • Multi-Threaded Attach
    • BIND
    • Debugging
    • Generated Code
    • Catalog Tables for Packages and PLANs
  4. Cursors
    • Cursor Processing Overview
    • DECLARE Cursor
    • OPEN Cursor
    • FETCH
    • CLOSE Cursor
    • A Complete Example
    • Positioned UPDATE and DELETE
    • Updating with a Read-Only Cursor
    • Logical Unit of Work Overview
    • Two-Phase Commit Protocol
  5. Performance
    • The Db2 Optimizer
    • Tuning SQL
    • Access Path Choices
    • Index Processing
    • Prefetch
    • Predicate Evaluation
    • Coding SQL for Performance