Know Db2

Db2 for z/OS SQL and Application Coding

Db2 SQL and Application Coding is a 5-day hands-on course, takes the student from an introduction to Db2, through learning SQL, working with SQL interactively and writing static SQL programs.Working with the EXPLAIN statement they will become familiar with tuning techniques used in Db2 z/OS.

Topics Covered:

Duration: 5 days Hands-on

Audience: Lead Application Programmers, Application Programmers, Data Base Designers, Data Base Administrators and Business Analysts that require a working knowledge of SQL and SQL application coding.

Prerequisites: Students should have a working knowledge of TSO/ISPF or be familiar with an SQL Query Tool.

Objectives: Students will write SQL statements, run SQL statements interactively, write SQL application programs, prepare programs and execute them and work with the EXPLAIN to evaluate SQL performance.

Db2 SQL and Application Coding Class Outline:

Db2 Concepts

  • Db2 Environment
  • Data Structures
  • Structured Query Language
  • Application Processes
  • Concurrency and Recovery
  • Db2 Interactive
  •  

Basic Single Table SQL

  • Data Retrieval
  • Result tables
  • SELECT Statement Structure
  • Selecting Columns : SELECT
  • Selecting Rows
  • Search conditions: WHERE
  • Using Functions and Expressions
  • Ordering the result table rows: ORDER BY
  • Merging intermediate results: UNION
  • Special Registers
  •  

Working with Multiple Tables

  • Joining Data from Multiple Tables
  • Inner join
  • Full Outer Join
  • Left Outer Join
  • Right Outer Join
  • Using multiple Join types in a Query
  • Nested Table Expressions
  •  

Summary Processing and Data Modifications

  • Summary results: GROUP BY
  • Limiting Groups: HAVING
  • Using Subqueries
  • How to code Subqueries
  • Correlated Subqueries
  • Non-correlated Subqueries
  • Modifying Data
  •  

Static SQL in a Host Application

  • Coding Conventions for Embedded SQL
  • Generating and using DCLGEN
  • SQLCA
  • SQLCODE handling
  • Host Variables
  • Indicator Variables
  • Singleton Select’s
  • Delete, Update, Insert
  •  

Preparing your Program for Execution

  • Db2 Precompiler
  • Compile Your Program
  • Link Edit
  • Bind : Package
  • Bind : Plan
  • Output Listings
  • Problem Determination
  •  

Cursor Processing

  • Declare a Cursor
  • Open, Fetch, Close a Cursor
  • Deleting, Updating using a Cursor
  • Cursor with Hold
  • Cursor for Read Only
  •  

Introduction to Performance

  • What is the Optimizer?
  • Predicates (Indexable, Stage 1 and Stage 2)
  • Access Paths and how they work
  • Explain - the Basics
  •  

Transaction Locking Overview

  • Four Basic aspects of Locks
  • Bind Options
  • Acquire/Release Options
  • Isolation Options
  • CURRENTDATA - Lock Avoidance Factors
  •  
  • ©2014 Computer Business International, Inc.

 

 

Would you like to schedule or customize this class?
Please call our toll free number (866-224-4968) or email us at info@cbi4you.com.