Db2 13 – Building Db2 COBOL Programs
Duration
3 hours
Overview
This course discusses the steps required to create Db2 COBOL programs.
Audience
Programmers and DBAs requiring training in writing application programs to reference and update Db2 data, particularly in the z/OS environment.
Prerequisites
Successful completion of the Db2 13 – Create and Maintain Db2 Programs course.
Objectives
After completing this course, the student should be able to:
- Create a COBOL program that issues simple SQL statements to Db2
- Write a Db2 COBOL Program Using a Cursor
Course Content
Writing a Db2 COBOL Program
Using DCLGEN to Determine Table Structure
Testing SQL Statements Using SPUFI
Adding an SQL INCLUDE Statements
Host Variable Declarations
Including Simple Error Handling Routines
Precompiling. Compiling, and Linking the COBOL Program
Binding the COBOL Program
Running the Program
Writing a Db2 COBOL Cursor Update Program
Declaring a Cursor
Opening and Closing the Cursor
Coding a Loop
Using the FETCH Statement
Defining an Update Cursor