Home About Courses Schedule Services Webinars Contact Search

Exploiting Native SQL Stored Procedures on Db2 for z/OS

SEE SCHEDULE

Duration: 3 Days

Method: Instructor led, Hands-on workshops

Price: $1800.00

Course Code: DB1029



View Related Video

Audience

Analysts and programmers involved in the development of Db2 for z/OS SQL Stored Procedures.

Description

One of the most anticipated new features of Db2 for z/OS was the Native SQL PL stored procedure. A key advantage is the ability to work entirely within the IBM Data Studio environment and accomplish Db2 development with no green screen. This course covers the mechanics of coding, testing and debugging and deploying these stored procedures.

Objectives

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

  • Understand the benefits of Stored Procedures
  • Code Db2 Stored Procedures using SQL Procedure Language (including the new “native” stored procedures on Db2 for z/OS)
  • Use the IBM Data Studio to develop SQL Procedures
  • Use the Unified Debugger to test and troubleshoot stored procedures

Prerequisites

Understanding of relational database concepts and SQL syntax (Db2 SQL For Everyone or equivalent).

Topics

  1. Introduction to Stored Procedures
    • What are Stored Procedures?
    • Problems Solved Using Stored Procedures
    • Advantages of using Stored Procedures
    • Calling a Stored Procedure
    • Native and External SQL Procedures
    • Stored Procedure Run-time Environments
  2. The SQL Procedure Language
    • CREATE PROCEDURE statement
    • Db2 for z/OS BIND options
    • Declaring SQL Variables
    • Procedural Statements in SQ
    • Creating & Retrieving Result Sets
    • Calling another Stored Procedure
  3. IBM Data Studio
    • Introduction to Data Studio
    • Managing Database Connections
    • Coding Stored Procedures
    • Deploying Stored Procedures
    • Importing Existing Stored Procedures
  4. Error Handling in SQL PL
    • Capturing SQLCODE and SQLSTATE
    • Unhandled Exception Behavior
    • Coding Exception Handlers
    • GET DIAGNOSTICS
    • SIGNAL & RESIGNAL Commands
  5. Global Temporary Tables
    • Created Global Temporary Tables
    • Declared Global Temporary Tables
    • Example of a Stored Procedure Using Declared Global Temporary Table
  6. Native SQL Logistical & Performance Considerations
    • Naming Conventions
    • Versioning Procedures
    • Performance and Execution Considerations
    • Using Explain
    • Migrating External to Native
  7. Unified Debugger in IBM Data Studio
    • Invoking the Debugger
    • The Debug Perspective
    • Using Breakpoints
    • Working with Variables & Values
  8. User Defined Functions with SQL PL:
    • External User Defined Functions
    • “Native” Scalar Functions
    • Non-inline Scalar Functions
    • “Native” Table Functions