Home About Courses Schedule Services Webinars Contact Search

Db2 for z/OS Embedded SQL Programming

SEE SCHEDULE

Duration: 2 Days

Method: Instructor led, Hands-on workshops

Price: $1125.00

Course Code: DB1001


View Related Video

Audience

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

Description

Db2 for z/OS Embedded SQL Programming is a 2 day course targeting the needs of COBOL programmers and developers writing applications that access data stored in a Db2 database. Students will code, compile, and test 3 programs over the 2 days that will first cover SQL select, insert, update, and delete statements. It then moves to cursor processing (fetching and updating), and finally into multi row fetch and insert processing. All topics are reinforced with lectures, and always with a slant on performance. Program preparation is greatly enforced so the students come out with an understanding of the COBOL recompile, compile, and bind processing. Every developer should understand what the Db2 plans, packages and binds are all about, and this course covers them all. Students will leave these 2 days with the ability to code new programs and perform maintenance and testing on existing COBOL programs all the way from test to production. Performance best practices are taught along the way!

Objectives

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 using the COBOL programming language
  • Understand program precompile, compile, and the bind process
  • Understand plans, packages, and collections
  • Understand COBOL null processing
  • Understand Db2 error processing
  • 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 for fetching
  • Process multi-row inserts and how to use the ‘Get Diagnostics’
  • Understand SQL Commit and Rollback
  • Program Preparation

Prerequisites

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

Topics

  • I. 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
  • II. 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
    • SQLCODE and SQLSTATE
    • Error Handling
  • III. Program Preparation Steps
    • DCLGEN
    • Program Preparation with Precompiler
    • Program Preparation with Coprocessor
    • The TSO Terminal Monitor Program
    • JCL for COBOL/Db2 batch
    • TSO Batch Attachmen
    • BIND Process / BIND Parameters
    • Debugging Precompile and Compile Errors
    • Precompile Generated Code
    • Catalog Tables for Packages and PLANs
  • IV. 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
    • COMMIT, ROLLBACK and SAVEPOINT
    • Two-Phase Commit Protocol
  • V. Multi-Row Processing
    • Multi-Row Fetch
    • Multi Row Looping Logic
    • Multi-Row Updating
    • Multi-Row Deleting
    • Multi-Row Inserting
    • Get Diagnostics Error Processing